| | |
| | | ",HMainSourceBillType=" + omodel.HMainSourceBillType.ToString() + |
| | | ",HMainSourceInterID=" + omodel.HMainSourceInterID.ToString() + |
| | | ",HMainSourceEntryID=" + omodel.HMainSourceEntryID.ToString() + |
| | | ",HMainSourceBillNo=" + omodel.HMainSourceBillNo.ToString() + |
| | | ",HMainSourceBillNo='" + omodel.HMainSourceBillNo.ToString() +"'"+ |
| | | ",HSourceID=" + omodel.HSourceID.ToString() + |
| | | ",HProcID=" + omodel.HProcID.ToString() + |
| | | ",HMaterID=" + omodel.HMaterID.ToString() + |
| | |
| | | ",'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "','" + oSub.HBillNo_bak + "'" + |
| | | ") "); |
| | | } |
| | | sReturn = "修改单据成功!"; |
| | | sReturn = omodel.HInterID.ToString(); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | //删除单据 |
| | | public override bool DeleteBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //判断是否允许删除 |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Sc_MaterToSourceBill_DelCtrl @HInterId=" + lngBillKey + "", "h_p_Sc_MaterToSourceBill_DelCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | sReturn = "无验证数据!"; |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | return false; |
| | | } |
| | | |
| | | //删除关联关系 |
| | | oCn.RunProc("exec h_p_Sc_MaterToSourceBill_DelRelation @HInterId=" + lngBillKey + ""); |
| | | |
| | | //删除明细表 |
| | | oCn.RunProc("Delete From " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString()); |
| | | //删除主表 |
| | | oCn.RunProc("Delete From " + MvarItemKey + " where HInterID=" + lngBillKey.ToString()); |
| | | |
| | | sReturn = "删除单据成功!"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //审核 |
| | | public bool CheckBill(Int64 lngBillKey, ref string sReturn) |
| | | { |