制作通用的单据编辑样例模块(生产汇报单列表/编辑),以方便其他开发人员可以借鉴。
| | |
| | | DataSet ds0 = oCN.RunProcReturn("select HPRDORGID,HDeptID from Sc_ICMOBillMain where HBillNo='"+ workcode + "'", "Sc_ICMOBillMain"); |
| | | |
| | | //查询产量汇报临时表 |
| | | ds = oCN.RunProcReturn("select top1* from Sc_ICMOBillWorkQtyStatus_Tmp where HICMOReportInterID='"+ HInterID + "' and HICMOReportBillNo='" + ScMaxWork + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); |
| | | ds = oCN.RunProcReturn("select top 1 * from Sc_ICMOBillWorkQtyStatus_Tmp where HICMOReportInterID='" + HInterID + "' and HICMOReportBillNo='" + ScMaxWork + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); |
| | | if (ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //调用WebService服务 |
| | | |
| | | WebS.ClsSc_ICMOReportBillMain model = new WebS.ClsSc_ICMOReportBillMain(); |
| | | model.HInterID = HInterID; |
| | | model.HBillNo = ScMaxWork; |
| | | model.HYear= DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | model.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | //model.HYear= DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | //model.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | model.HDate = DateTime.Now; |
| | | model.HRemark = ""; |
| | | model.HMaker = HMaker; |
| | | model.HEmpID = 0; |
| | | model.HGroupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HGroupID"]); |
| | | model.HDeptID= DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HDeptID"]); |
| | | model.HPRDORGID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HPRDORGID"]); |
| | | model.HPRDORGID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HPRDORGID"]); |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | bool flag=oWebs.set_SaveICMOProductReportBill_Layui(model, sHSourceType, ref DBUtility.ClsPub.sErrInfo); |
| | | if (flag) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | objJsonResult.data = 1; |
| | | } |
| | |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //关闭类型 |
| | | //oItemSub.HRemark = ""; //备注 |
| | | oItemSub.HSourceInterID = 0; // 源单主内码 |
| | | oItemSub.HSourceInterID =0; // 源单主内码 |
| | | oItemSub.HSourceEntryID = 0; //源单子内码 |
| | | //oItemSub.HSourceBillNo = ""; //源单单号 |
| | | //oItemSub.HSourceBillType = ""; //源单类型 |
| | |
| | | ",HUpDater='" + omodel.HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" + |
| | | ",HMainSourceInterID=" + omodel.HMainSourceInterID.ToString() + |
| | | ",HMainSourceEntryID=" + omodel.HMainSourceEntryID.ToString() + |
| | | ",HMainSourceBillType=" + omodel.HMainSourceBillType.ToString() + |
| | | |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HDeptNumber='" + omodel.HDeptNumber +"'"+ |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HEmpID,HEmpNumber" + |
| | | ",HGroupID,HDeptID,HDeptNumber" + |
| | | ",HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker+ "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HEmpID.ToString() + "','" + omodel.HEmpNumber + |
| | | "','" + omodel.HGroupID.ToString() + "'," + omodel.HDeptID.ToString() + ",'" + omodel.HDeptNumber + "'"+ |
| | | "','" + omodel.HMainSourceBillNo.ToString() + "'," + omodel.HMainSourceInterID.ToString() + ",'" + omodel.HMainSourceEntryID + "','" + omodel.HMainSourceBillType + "'" + |
| | | ") "); |
| | | //插入子表 |
| | | foreach (Models.ClsSc_ICMOReportBillSub oSub in DetailColl) |
| | |
| | | public string HCheckType; |
| | | public Int64 HPrintQty; |
| | | public string HWorkShift; |
| | | |
| | | } |
| | | } |
| | |
| | | <publishTime>11/24/2014 11:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>07/21/2021 21:08:19</publishTime> |
| | | <publishTime>07/24/2021 00:11:41</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>07/21/2021 21:08:19</publishTime> |
| | | <publishTime>07/24/2021 00:11:41</publishTime> |
| | | </File> |
| | | <File Include="bin/WebGrease.dll"> |
| | | <publishTime>07/17/2013 17:03:52</publishTime> |
| | |
| | | <publishTime>07/21/2021 21:02:08</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>07/21/2021 21:08:25</publishTime> |
| | | <publishTime>07/24/2021 00:11:47</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |