| | |
| | | public DAL.ClsGy_SOPBill BillOld = new DAL.ClsGy_SOPBill(); |
| | | public bool BillChange; // |
| | | public DataGridView grdMain = new System.Windows.Forms.DataGridView(); |
| | | ClsGridViewSum oSumGrid = new ClsGridViewSum(); |
| | | ClsGridViewSum oSumGrid = new ClsGridViewSum(); |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | //å®ä¹ |
| | | public const Int16 HTagCol = 0; |
| | |
| | | string msgSub = sArray[1].ToString(); //表ä½ä¿¡æ¯ |
| | | string OperationType = sArray[2].ToString(); //æä½ç±»å |
| | | string user = sArray[3].ToString(); //ç¨æ· |
| | | DBUtility.ClsPub.CurUserName = user; |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | DAL.ClsGy_SOPBill oBill = new DAL.ClsGy_SOPBill(); |
| | |
| | | [HttpPost] |
| | | public object UploadFile1() |
| | | { |
| | | |
| | | string path=""; |
| | | string HBillNo = HttpContext.Current.Request.Params["HBillNo"]; //åæ®å· |
| | | string HUserName = HttpContext.Current.Request.Params["HUserName"]; //å建人 |
| | | string HInterID = HttpContext.Current.Request.Params["HInterID"]; //åæ®å
ç |
| | | HttpPostedFile files = HttpContext.Current.Request.Files["file"]; //æä»¶ |
| | | string path = HttpContext.Current.Server.MapPath("~/../Files/SOP/" + HBillNo); |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æå·æ¯è«å°") |
| | | { |
| | | path = "D:/ç½ç«åå¸/MES/MESæµè¯/LAYUI/Files/SOP/" + HBillNo; |
| | | } |
| | | else |
| | | { |
| | | path = HttpContext.Current.Server.MapPath("~/../Files/SOP/" + HBillNo); |
| | | } |
| | | } |
| | | //string path = @"D:\\Files\\"+ HBillNo; |
| | | Int64 HEntryID = Convert.ToInt64(HttpContext.Current.Request.Params["HEntryID"]); //åå
ç |
| | | dynamic dyResult = UpLoadFile(files, path, HBillNo, HInterID, HUserName, HEntryID); |
| | |
| | | { |
| | | File.Delete(fileurl); //å 餿宿件 |
| | | files.SaveAs(fileurl); |
| | | string StrPath = "/files/SOP/" + HBillNo + "/" + filename; |
| | | string StrPath = ""; |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æå·æ¯è«å°") |
| | | { |
| | | StrPath = "D:/ç½ç«åå¸/MES/MESæµè¯/LAYUI/Files/SOP/" + HBillNo + "/" + filename; |
| | | } |
| | | else |
| | | { |
| | | StrPath = "/files/SOP/" + HBillNo + "/" + filename; |
| | | } |
| | | } |
| | | |
| | | if (File.Exists(fileurl)) |
| | | { |
| | | //è¿éå¯ä»¥æ§è¡ä¸äºå
¶å®çæä½ï¼æ¯å¦æ´æ°æ°æ®åº |
| | |
| | | else |
| | | { |
| | | Directory.CreateDirectory(fileSavePath); //æ·»å æä»¶å¤¹ |
| | | files.SaveAs(fileurl); |
| | | string StrPath = "/files/SOP/" + HBillNo + "/" + filename; |
| | | files.SaveAs(fileurl); |
| | | string StrPath = ""; |
| | | string Ret = ""; |
| | | //if (oSystemParameter.ShowBill(ref Ret)) |
| | | //{ |
| | | // if (oSystemParameter.omodel.WMS_CampanyName == "æå·æ¯è«å°") |
| | | // { |
| | | // StrPath = "D:/ç½ç«åå¸/MES/MESæµè¯/LAYUI/Files/SOP/" + HBillNo + "/" + filename; |
| | | // } |
| | | // else |
| | | // { |
| | | // StrPath = "/files/SOP/" + HBillNo + "/" + filename; |
| | | // } |
| | | //} |
| | | StrPath = "/files/SOP/" + HBillNo + "/" + filename; |
| | | |
| | | if (File.Exists(fileurl)) |
| | | { |
| | | //è¿éå¯ä»¥æ§è¡ä¸äºå
¶å®çæä½ï¼æ¯å¦æ´æ°æ°æ®åº |