| | |
| | | oItem.HQtyMin = int.Parse(item["最大订货量"].ToString() == "" ? "0" : item["最大订货量"].ToString()); |
| | | oItem.HEngName = item["英文名称"].ToString(); |
| | | oItem.HEngModel = item["英文规格"].ToString(); |
| | | //常规赋值 |
| | | //常规赋值赋空值防止报错 |
| | | oItem.HMaterTypeID = 0; |
| | | oItem.HColorRemark = ""; |
| | | oItem.HColorNo = ""; |
| | | oItem.HMaterRuleType = ""; |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); |
| | | if (sShortNumber.Trim() == "") |
| | |
| | | { |
| | | |
| | | int HItemID = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString()); |
| | | oBill.ModifyByID(HItemID); |
| | | oBill.oModel.HItemID = HItemID; |
| | | oBill.ModifyByID(oBill.oModel.HItemID); |
| | | |
| | | } |
| | | |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string sql1 = "select top 5000 * from h_v_IF_BarCodeBillList where 1 = 1 "; |
| | | string sql1 = "select top 15000 * from h_v_IF_BarCodeBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_BarCodeBillList"); |
| | | |
| | |
| | | int HNowWHID = mainList[0].HNowWHID; |
| | | int HNowSPID = mainList[0].HNowSPID; |
| | | |
| | | //保存前控制========================================= |
| | | string HBillNote = ""; |
| | | ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_BeforeSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:保存前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into Gy_MouldFileMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | |
| | | |
| | | objJsonResult = AddBillSub(msg5,msg6,msg7,HInterID, HBillNo); |
| | | |
| | | //保存后控制========================================= |
| | | ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_AfterSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:保存前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |