using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { public class ClsCB_EntrustMoneyCost_D:DBUtility.ClsXt_BaseBill { public Model.ClsCB_EntrustMoneyCost_M omodel = new Model.ClsCB_EntrustMoneyCost_M(); public ClsCB_EntrustMoneyCost_D() { base.MvarItemKeySub = ""; base.MvarItemKeySub2 = ""; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey = "CB_EntrustMoneyCost"; base.MvarReportTitle="委外成本表"; base.BillType="1815"; base.HBillSubType = "1815"; } #region 固定代码 ~ClsCB_EntrustMoneyCost_D() { //DetailColl = null; } #endregion 自定义方法 //新增 public override bool AddBill(ref string sReturn) { try { oCn.BeginTran(); //foreach (Model.ClsCB_MaterMoneyCost_M omodel in DetailColl) //{ oCn.RunProc("Insert into CB_EntrustMoneyCost " + " (HYear,HPeriod,HBillType,HRelationInterID" + ",HMaterID,HQty,HPrice,HMoney" + ",HDeptID,HRemark,HMaker,HMakeDate" + ",HPrice_New,HPrice_H,HPrice_L,HProcID)" + " Values(" + omodel.HYear.ToString() + "," +omodel.HPeriod.ToString() + ",'" + omodel.HBillType+"',"+ omodel.HRelationInterID.ToString() + "," + omodel.HMaterID.ToString() +"," + omodel.HQty.ToString() +","+omodel.HPrice.ToString() +"," +omodel.HMoney.ToString() + "," + omodel.HDeptID.ToString() +",'" +omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + "," + omodel.HPrice_New.ToString() +"," +omodel.HPrice_H.ToString() +"," +omodel.HPrice_L.ToString() + "," +omodel.HProcID.ToString() + ") "); //修改上级为非末级代码 //} sReturn = "新增单据成功!"; oCn.Commit(); return true; } catch (Exception e) { oCn.RollBack(); throw (e); } } //修改 } }