using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { public class ClsGy_Supplier_Extend_Ctl:DBUtility.ClsGy_Base_Ctl { SQLHelper.ClsCNK3 oCnK3 = new SQLHelper.ClsCNK3(); public Model.ClsGy_Supplier_Extend_Model oModel ; //新增 public override bool AddNew() { try { oCnK3.BeginTran(); DeleteByID(oModel.HItemID); oCnK3.RunProc("Insert into " + MvarItemKey + " " + " (HItemID,HUserID,HPassWord)" + " Values(" + oModel.HItemID.ToString() + ",'" + oModel.HUserID + "','" + oModel.HPassWord + "')", ref DBUtility.ClsPub.sExeReturnInfo); oCnK3.Commit(); return true; } catch (Exception e) { oCnK3.RollBack(); throw (e); } } //删除 public bool DeleteByID(Int64 sItemID) { try { oCnK3.RunProc("Delete from " + MvarItemKey + " where HItemID='" + sItemID + "'", ref DBUtility.ClsPub.sExeReturnInfo); return true; } catch (Exception e) { throw (e); } } //构造函数 public ClsGy_Supplier_Extend_Ctl() { MvarItemKey = "h_b_Gy_Supplier_Extend"; MvarReportTitle = "供应商扩展设置"; oModel = new Model.ClsGy_Supplier_Extend_Model(); } } }