| | |
| | | List<SOPBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SOPBill>>(msg2); |
| | | |
| | | string HBillNo = list[0].HBillNo; |
| | | int HInterID = list[0].HInterID; |
| | | DateTime HDate = list[0].HDate; |
| | | string HName = list[0].HName; |
| | | int HMaterID = list[0].HMaterID; |
| | |
| | | ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + |
| | | ",HUnitID,HMaterNumber,HUnitNumber,HStandard" + |
| | | ") " + |
| | | " values('" + 3305 + "'," + lID + ",'" + HBillNo + "'," + "getdate()" + |
| | | " values('" + 3305 + "'," + HInterID + ",'" + HBillNo + "'," + "getdate()" + |
| | | "," + "datepart(yyyy,GETDATE())" + "," + "datepart(mm,getdate())" + ",'" + HRemark + "','" + HMaker + "'," + "getdate()" + "," + HMaterID.ToString() + ",'" + HName + "'," + HMaterTypeID + |
| | | "," + HUnitID.ToString() + ",'" + HMaterNumber + "','" + HUnitNumber + "','" + HStandard.ToString() + |
| | | "') "); |
| | | |
| | | oCN.RunProc("update Gy_BillNumber set IDNow=IDNow+1 where BillType='" + BillType.Trim() + "'"); |
| | | //oCN.RunProc("update Gy_BillNumber set IDNow=IDNow+1 where BillType='" + BillType.Trim() + "'"); |
| | | //" values(" + 3305 + "','" + 12333 + "','" + "test" + "','" + HDate + "','" + |
| | | //2022 + "','" + 11 + "','" + HRemark + "','" + "Test" + "','" + "2022-11-04" + "','" + HMaterID.ToString() + "','" + HName + "','" + "656" + |
| | | //"','" + HUnitID.ToString() + "','" + HMaterNumber + "','" + HUnitNumber + "','" + HStandard.ToString() + |
| | |
| | | "(HInterID,HEntryID,HProcID,HProcNO" + |
| | | ",HWorkStationID,HCenterID,HRemark" + |
| | | ") values(" |
| | | + lID + "," + 1 + "," + HProcID + "," + HProcNo + |
| | | + HInterID + "," + 1 + "," + HProcID + "," + HProcNo + |
| | | "," + HWorkStationID + "," + HCenterID + ",'" + HRemark2 + "'" + |
| | | ") "); |
| | | |
| | |
| | | { |
| | | |
| | | string HBillNo = HttpContext.Current.Request.Params["HBillNo"]; //åæ®å· |
| | | string HRemark = HttpContext.Current.Request.Params["HRemark"]; //夿³¨ |
| | | string HUserName = HttpContext.Current.Request.Params["HUserName"]; //å建人 |
| | | HttpPostedFile files = HttpContext.Current.Request.Files["file"]; |
| | | string HInterID = HttpContext.Current.Request.Params["HInterID"]; //å建人 |
| | | HttpPostedFile files = HttpContext.Current.Request.Files["file"]; //忮䏻å
ç |
| | | string path = HttpContext.Current.Server.MapPath("~/../Files/" + HBillNo); |
| | | //string path = @"D:\\Files\\"+ HBillNo; |
| | | dynamic dyResult = UpLoadFile(files, path, HBillNo, HRemark, HUserName); |
| | | dynamic dyResult = UpLoadFile(files, path, HBillNo, HInterID, HUserName); |
| | | if (dyResult != null && dyResult.result == 1) |
| | | { |
| | | objJsonResult.code = "1"; |
| | |
| | | |
| | | } |
| | | |
| | | public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HRemark, string HUserName) |
| | | public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HInterID, string HUserName) |
| | | { |
| | | dynamic Result_Ob = new { result = 1, returnval = "ä¸ä¼ æåï¼" }; |
| | | string filePath = Path.GetFullPath(files.FileName);//æä»¶ä¸ä¼ è·¯å¾ |
| | |
| | | ",HUpMan,HUpTime,HInterID,HEntryID,HSno,HFileID,HFileSize" + |
| | | ") values('" |
| | | + filename.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + |
| | | ",'" + HUserName + "',getdate()" + ",'" + Sno + "','" + 0 + "','" + Sno + "','" + lID + "','" + 0 + |
| | | ",'" + HUserName + "',getdate()" + ",'" + HInterID + "','" + 0 + "','" + Sno + "','" + lID + "','" + 0 + |
| | | "') "); |
| | | } |
| | | else |
| | |
| | | ",HUpMan,HUpTime,HInterID,HEntryID,HSno,HFileID,HFileSize" + |
| | | ") values('" |
| | | + filename.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + |
| | | ",'" + HUserName + "',getdate()" + ",'" + 111 + "','" + 222 + "','" + 333 + "','" + 444 + "','" + 555 + |
| | | ",'" + HUserName + "',getdate()" + ",'" + HInterID + "','" + 222 + "','" + 333 + "','" + 444 + "','" + 555 + |
| | | "') "); |
| | | } |
| | | else |