| | |
| | | list.Add("ä»ªå¨æåæ¡ç è§å"); |
| | | list.Add("è¯åæåæ¡ç è§å"); |
| | | } |
| | | else if (sCapName == "æ·»åº·ç§æ") |
| | | { |
| | | list.Add("æ¹æ¬¡æ¡ç "); |
| | | } |
| | | else |
| | | { |
| | | list.Add("å¯ä¸æ¡ç "); |
| | |
| | | tabname = "h_v_IF_ProcessExchangeBillList_Source"; |
| | | count = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProcessExchangeBillList_Source " + sWhere + " order by åæ®å· desc,hsubid", tabname).Tables[0].Rows.Count; |
| | | sql = string.Format(@"select top " + pageSize + " * from(select row_number() over (order by åæ®å· desc,hsubid) as HRowNumber,* from h_v_IF_ProcessExchangeBillList_Source " + sWhere + ") as A where HRowNumber >" + pageSize + " *(" + pageNum + "-1)"); |
| | | break; |
| | | case "éå®åºåºå": |
| | | tabname = "h_v_IF_SellOutBillList_Source"; |
| | | count = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList_Source " + sWhere + " order by åæ®å· desc,hsubid", tabname).Tables[0].Rows.Count; |
| | | sql = string.Format(@"select top " + pageSize + " * from(select row_number() over (order by åæ®å· desc,hsubid) as HRowNumber,* from h_v_IF_SellOutBillList_Source " + sWhere + ") as A where HRowNumber >" + pageSize + " *(" + pageNum + "-1)"); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | //åå
¥ä¿¡æ¯ |
| | | ListRows.Add(HSourceOrderList1(ds.Tables[0], ordrlist, HBarCodeType, HSourceBillType)); |
| | | break; |
| | | case "1205": //éå®åºåºå |
| | | //å¾å°ä¿¡æ¯ |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_SellOutBillList_BarCode where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_SellOutBillList_BarCode"); |
| | | //åå
¥ä¿¡æ¯ |
| | | ListRows.Add(HSourceOrderList1(ds.Tables[0], ordrlist, HBarCodeType, HSourceBillType)); |
| | | break; |
| | | case "1102": //éè´è®¢å |
| | | //å¾å°ä¿¡æ¯ |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_POOrderList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_POOrderList"); |
| | |
| | | |
| | | public object HSourceOrderList(DataTable dt, HSouceOrderList ordrlist,string HBarCodeType) |
| | | { |
| | | oSystemParameter.ShowBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | ordrlist.HQty = dt.Rows[i]["æªçææ¡ç æ°é"].ToString(); |
| | |
| | | ordrlist.HSourceName = dt.Rows[i]["ç产线"].ToString(); |
| | | ordrlist.HEndDate = dt.Rows[i]["计åå®å·¥æ¥æ"].ToString();//忥 ç产订å å¤±ææ¥æ |
| | | ordrlist.HMinQty = dt.Rows[i]["æå°å
è£
æ°"].ToString(); |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "ä¹è±") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | ordrlist.HGroupID = Convert.ToInt32(dt.Rows[i]["HBeginWorkGroupID"]); |
| | | ordrlist.HGroupNumber = dt.Rows[i]["å¼å·¥çç»ä»£ç "].ToString(); |
| | | ordrlist.HGroupName = dt.Rows[i]["å¼å·¥çç»åç§°"].ToString(); |
| | | ordrlist.HEmpID = Convert.ToInt32(dt.Rows[i]["HBeginWorkEmpID"]); |
| | | ordrlist.HEmpNumber = dt.Rows[i]["å¼å·¥äººä»£ç "].ToString(); |
| | | ordrlist.HEmpName = dt.Rows[i]["å¼å·¥äººåç§°"].ToString(); |
| | | } |
| | | |
| | | if (HBarCodeType == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | ordrlist.HMinQty = dt.Rows[i]["æªçææ¡ç æ°é"].ToString(); |
| | |
| | | ordrlist.HSPNumber = dt.Rows[i]["ä»ä½ä»£ç "].ToString(); |
| | | ordrlist.HSPName = dt.Rows[i]["ä»ä½"].ToString(); |
| | | } |
| | | if(HSourceBillType == "éå®åºåºå") |
| | | { |
| | | ordrlist.HWhID = dt.Rows[i]["HWhID"].ToString(); |
| | | ordrlist.HWhNumber = dt.Rows[i]["ä»åºä»£ç "].ToString(); |
| | | ordrlist.HWhName = dt.Rows[i]["ä»åº"].ToString(); |
| | | //ordrlist.HSPID = dt.Rows[i]["HSPID"].ToString(); |
| | | //ordrlist.HSPNumber = dt.Rows[i]["ä»ä½ä»£ç "].ToString(); |
| | | //ordrlist.HSPName = dt.Rows[i]["ä»ä½"].ToString(); |
| | | } |
| | | } |
| | | return ordrlist; |
| | | } |
| | |
| | | if (oDs == null && oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="çææ¹æ¬¡å¤±è´¥ï¼"; |
| | | objJsonResult.Message= "[0000-2-053]çææ¹æ¬¡å¤±è´¥ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message = "çææ¹æ¬¡æåï¼"; |
| | | objJsonResult.Message = "[0000-2-054]çææ¹æ¬¡æåï¼"; |
| | | objJsonResult.data = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | b = true; |
| | |
| | | if (b == false) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="没æéè¦çææ¹æ¬¡çæç»è¡ï¼"; |
| | | objJsonResult.Message= "[3899-2-003]没æéè¦çææ¹æ¬¡çæç»è¡ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else //å®å
¨å°é |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éæ©ç»ç»æé误!"; |
| | | objJsonResult.Message = "[0000-2-055]éæ©ç»ç»æé误!"; |
| | | return objJsonResult; |
| | | } |
| | | if (!Sub_AllowSave(msg2, HSelectBarCodeType))//忮宿´æ§å¤æ |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¡ç çæå¤±è´¥!"+e.Message; |
| | | objJsonResult.Message = "[3899-2-006]æ¡ç çæå¤±è´¥!" + e.Message; |
| | | return objJsonResult; |
| | | } |
| | | return objJsonResult; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¡ç çæå®æ´æ§å¤æé误"; |
| | | objJsonResult.Message = "[3899-2-007]æ¡ç çæå®æ´æ§å¤æé误"; |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "1") |
| | |
| | | |
| | | Int64 HGroupID = 0; |
| | | long HEmpID = 0; |
| | | string HCusModel = ""; //客æ·ç©æè§æ ¼ |
| | | string HCusMaterName = ""; //客æ·ç©æåç§° |
| | | string HCheckEmpName = ""; //æ£éªååç§° |
| | | |
| | | DataSet Ds; |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | HheatNO = ClsPub.isStrNull(ordrlist[j].HheatNO); |
| | | HGroupID = ClsPub.isInt(ordrlist[j].HGroupID); |
| | | HEmpID = ClsPub.isLong(ordrlist[j].HEmpID); |
| | | HCusModel = ClsPub.isStrNull(ordrlist[j].HCusModel); |
| | | HCusMaterName = ClsPub.isStrNull(ordrlist[j].HCusMaterName); |
| | | HCheckEmpName = ClsPub.isStrNull(ordrlist[j].HCheckEmpName); |
| | | //æ¥æè·åæ¹å¼ |
| | | sDate = DateTime.Now.ToString(); |
| | | // |
| | |
| | | sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HEndDate); |
| | | } |
| | | else if (CampanyName == "å¤å®çµå¨")// æ¥æï¼çäº§è®¢å æ¡ç æ¥æ |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HDate); |
| | | } |
| | | else if (CampanyName == "ä¹è±")// æ¥æï¼çäº§è®¢å æ¡ç æ¥æ |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HDate); |
| | | } |
| | |
| | | |
| | | barcode.HGroupID2 = ordrlist[j].HGroupID; |
| | | barcode.HEmpID2 = ordrlist[j].HEmpID; |
| | | barcode.HCusModel2 = ordrlist[j].HCusModel; |
| | | barcode.HCusMaterName2 = ordrlist[j].HCusMaterName; |
| | | barcode.HCheckEmpName2 = ordrlist[j].HCheckEmpName; |
| | | ListRows.Add(barcode); |
| | | k = k + 1; |
| | | n = n + 1; |
| | |
| | | DateTime HProduceDate; |
| | | DateTime HExpiryDate; |
| | | long HEmpID2 = 0; |
| | | string HCusModel2 = ""; |
| | | string HCusMaterName2 = ""; |
| | | string HCheckEmpName2 = ""; |
| | | |
| | | try |
| | | { |
| | |
| | | if (CampanyName == "åæ¥ç§æ" || CampanyName == "å¤å®çµå¨") |
| | | { |
| | | HBarCodeType = "å¯ä¸æ¡ç "; |
| | | } |
| | | if (CampanyName == "ä¹è±") |
| | | { |
| | | HBarCode = HBarCode + ClsPub.isStrNull(ListRows[i].HMTONo2); |
| | | } |
| | | // |
| | | HMaterID = ClsPub.isLong(ListRows[i].HMaterID2); |
| | |
| | | HExpiryDate = ClsPub.isDate(ListRows[i].HExpiryDate); |
| | | HGroupID2 = ClsPub.isInt(ListRows[i].HGroupID2); |
| | | HEmpID2 = ClsPub.isLong(ListRows[i].HEmpID2); |
| | | HCusModel2 = ClsPub.isStrNull(ListRows[i].HCusModel2); |
| | | HCusMaterName2 = ClsPub.isStrNull(ListRows[i].HCusMaterName2); |
| | | HCheckEmpName2 = ClsPub.isStrNull(ListRows[i].HCheckEmpName2); |
| | | oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + |
| | | ",HGiveAwayFlag " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + |
| | | ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate,HEmpID " + |
| | | ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate,HEmpID,HCusModel,HCusMaterName,HCheckEmpName " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID2.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() |
| | |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + "" |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'," + HEmpID2.ToString() + ")"); |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'," + HEmpID2.ToString() + ",'" + HCusModel2 + "','" + HCusMaterName2 + "','" + HCheckEmpName2 + "'" + ")"); |
| | | |
| | | |
| | | //HNumber = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterID2Col].Value); |
| | |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åèµæºç»å®æ°æ®æåï¼"; |
| | | objJsonResult.Message = "[0000-1-037]è·åèµæºç»å®æ°æ®æåï¼"; |
| | | objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //åºååDataSetä¸çæ¶é´æ ¼å¼ï¼ç¶ååååºåå忥 |
| | | objJsonResult.list = listobj; |
| | | return objJsonResult; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½ç»æ,æ¡ç ä¸åå¨ï¼"; |
| | | objJsonResult.Message = "[0000-2-020]没æè¿åä»»ä½ç»æ,æ¡ç ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = listobj; |
| | | return objJsonResult; |
| | |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¡ç çæå¤±è´¥ï¼" + e.Message; |
| | | objJsonResult.Message = "[3899-2-006]æ¡ç çæå¤±è´¥ï¼" + e.Message; |
| | | return objJsonResult; |
| | | } |
| | | } |