| | |
| | | tb2.Columns.Add("HSourceID", typeof(Int32));//çäº§èµæºid |
| | | tb2.Columns.Add("ICMOBillHInterID", typeof(Int32));//ç产订å主id |
| | | tb2.Columns.Add("ICMOBillHEntryID", typeof(Int32));//ç产订ååid |
| | | tb2.Columns.Add("HProdORGID", typeof(Int32));//ç»ç»id |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | |
| | | { |
| | | //åå·¥ |
| | | ds = oCN.RunProcReturn($"select * from Gy_Employee where HNumber='{tb2.Rows[i]["åå·¥ç¼ç "].ToString()}'", "Gy_Employee"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | if (ds.Tables[0].Rows.Count > 0) { |
| | | tb2.Rows[i]["åå·¥ç¼ç "] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡,åå·¥æ¥æ æ°æ®!"; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //计éåä½ |
| | | ds = oCN.RunProcReturn($"select * from Gy_Unit where HNumber='{tb2.Rows[i]["计éåä½"].ToString()}'", "Gy_Unit"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡,计éå使¥æ æ°æ®!"; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //çäº§èµæº |
| | | ds = oCN.RunProcReturn($"select * from Gy_Source where HNumber='{tb2.Rows[i]["çäº§èµæºç¼ç *"].ToString()}'", "Gy_Source"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | tb2.Rows[i]["HSourceID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | else { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i+1}è¡,çäº§èµæºæ¥æ æ°æ®!"; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //ç»ç» |
| | | ds = oCN.RunProcReturn($"select * from Xt_ORGANIZATIONS where HNumber='{tb2.Rows[i]["ç»ç»ç¼ç *"].ToString()}'", "Xt_ORGANIZATIONS"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | tb2.Rows[i]["HProdORGID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡,ç»ç»æ¥æ æ°æ®!"; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | |
| | | HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);//è·å¾ä¸ä¸ªæ°çid |
| | | var HICMOBillNo = list[i]["ç产订åå·*"].ToString(); |
| | | var HICMOEntrySEQ = list[i]["ç产订åæç»è¡å·*"].ToString(); |
| | | var HProdORGID = list[i]["ç»ç»ç¼ç *"].ToString(); |
| | | var HProdORGID = list[i]["HProdORGID"].ToString(); |
| | | var HWorkShopID = list[i]["HWorkShopID"].ToString(); |
| | | var HSourceID = list[i]["HSourceID"].ToString(); |
| | | var HYX = list[i]["ä¼å
级"].ToString(); |