| | |
| | | if (CountractFileKeiId != null) |
| | | { |
| | | //修改文件 |
| | | sqlStr = string.Format(@"SELECT [Keyid] ,[FileName] ,[PageCode] ,[FilePath] ,[Remark] FROM [ECTEST].[dbo].[OA_CorporateClientContract] where Keyid='{0}'", CountractFileKeiId.ToString()); |
| | | sqlStr = string.Format(@"SELECT [Keyid] ,[FileName] ,[PageCode] ,[FilePath] ,[Remark] FROM [dbo].[OA_CorporateClientContract] where Keyid='{0}'", CountractFileKeiId.ToString()); |
| | | //开始修改文件 |
| | | SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection); |
| | | |
| | |
| | | throw e; |
| | | } |
| | | //写入数据库 |
| | | sqlStr = string.Format(@"USE [ECTEST] INSERT INTO [dbo].[OA_CorporateClientContract] ([Keyid] ,[CorporateClientsid] ,[CorporateClientsName] ,[FileName] ,[PageCode] ,[FilePath] ,[Remark] ,[Creater] ,[CreateTime] ) VALUES('{0}' ,'{1}' ,'{2}' ,'{3}' ,'{4}' ,'{5}' ,'{6}' ,'{7}' ,'{8}')",Guid.NewGuid().ToString(), Contract.CorporateClientsid.ToString(),"", Contract.FileName, Contract.PageCode, FilePath, Contract.Remark, Contract.Creater,DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | sqlStr = string.Format(@" INSERT INTO [dbo].[OA_CorporateClientContract] ([Keyid] ,[CorporateClientsid] ,[CorporateClientsName] ,[FileName] ,[PageCode] ,[FilePath] ,[Remark] ,[Creater] ,[CreateTime] ) VALUES('{0}' ,'{1}' ,'{2}' ,'{3}' ,'{4}' ,'{5}' ,'{6}' ,'{7}' ,'{8}')",Guid.NewGuid().ToString(), Contract.CorporateClientsid.ToString(),"", Contract.FileName, Contract.PageCode, FilePath, Contract.Remark, Contract.Creater,DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | try |
| | | { |
| | | SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection); |