| | |
| | | string HSourceID = ds.Tables[0].Rows[0]["HSourceID"].ToString(); |
| | | |
| | | ds = oCn.RunProcReturn(@"select HMouldID from Sc_MouldUpperBillMain a |
| | | inner join Sc_MouldUpperBillSub b on a.HInterID = b.HInterID where HICMOInterID=" + HICMOInterID + " and HICMOEntryID=" + HICMOEntryID + " and HProcExchInterID=" + HSourceInterID + " and HProcExchEntryID=" + HSourceEntryID + " and HSourceID=" + HSourceID + " order by HMakeDate desc", "Sc_MouldUpperBillMain"); |
| | | inner join Sc_MouldUpperBillSub b on a.HInterID = b.HInterID where HICMOInterID=" + HICMOInterID + " and HICMOEntryID=" + HICMOEntryID + " and HProcExchInterID=" + HSourceInterID + " and HProcExchEntryID=" + HSourceEntryID + " and HSourceID=" + HSourceID + " order by HMakeDate desc", "Sc_MouldUpperBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HMouldID= " + ds.Tables[0].Rows[0]["HMouldID"].ToString() + " where HInterID=" + omodel.HMainSourceInterID.ToString()); |
| | | } |
| | | |
| | | else |
| | | { |
| | | ds = oCn.RunProcReturn(@"select HMouldID from Sc_MouldUpperBillMain a |
| | | inner join Sc_MouldUpperBillSub b on a.HInterID = b.HInterID where HSourceID=" + HSourceID + " order by HMakeDate desc", "Sc_MouldUpperBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HMouldID= " + ds.Tables[0].Rows[0]["HMouldID"].ToString() + " where HInterID=" + omodel.HMainSourceInterID.ToString()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | sReturn = omodel.HInterID.ToString(); |
| | | oCn.Commit(); |
| | | return true; |