using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { public class ClsA3_Department_Ctl:DBUtility.ClsGy_Base_Ctl { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public Model.ClsA3_Department_Model oModel ; //新增 public override bool AddNew() { try { oCn.BeginTran(); base.DeleteByNumber(oModel.HNumber); oCn.RunProc("Insert into " + MvarItemKey + " " + " (HItemID,HNumber,HProcID) " + " Values("+oModel.HItemID.ToString()+",'"+oModel.HNumber+"',"+oModel.HProcID.ToString()+")", ref DBUtility.ClsPub.sExeReturnInfo); oCn.Commit(); return true; } catch (Exception e) { oCn.RollBack(); throw (e); } } //构造函数 public ClsA3_Department_Ctl() { MvarItemKey = "A3_Department_Extend"; MvarReportTitle = "部门设置"; oModel = new Model.ClsA3_Department_Model(); } } }