public void Remove(Models.SysGroup item) { DbCommand comm = this.GetCommand("SysGroup_Delete"); comm.AddParameter <string>(this.Factory, "Code", item.Code); this.SafeExecuteNonQuery(comm); }
public void Add(Models.SysGroup item) { DbCommand comm = this.GetCommand("SysGroup_Insert"); comm.AddParameter <string>(this.Factory, "Code", item.Code); comm.AddParameter <string>(this.Factory, "Name", item.Name); this.SafeExecuteNonQuery(comm); }
public Models.SysGroup Get(Models.SysGroup dummy) { DbCommand comm = this.GetCommand("SysGroup_Get"); comm.AddParameter <string>(this.Factory, "Code", dummy.Code); DataTable dt = this.GetTable(comm); return(EntityBase.ParseListFromTable <SysGroup>(dt).FirstOrDefault()); }
public void Update(Models.SysGroup @new, Models.SysGroup old) { var item = @new; item.Code = old.Code; DbCommand comm = this.GetCommand("SysGroup_Update"); comm.AddParameter <string>(this.Factory, "Code", item.Code); comm.AddParameter <string>(this.Factory, "Name", item.Name); this.SafeExecuteNonQuery(comm); }