// 根据主键ID返回指定的ZhanNeiXinJian实体 public static ZhanNeiXinJianBusEntity GetEntity(int ID) { ZhanNeiXinJianByPK exec = new ZhanNeiXinJianByPK(); exec.ID = ID; ZhanNeiXinJianBusEntity obj = new ZhanNeiXinJianBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return obj; }
// 公用静态方法,插入一条记录 InsertZhanNeiXinJian public static bool InsertEntity(ZhanNeiXinJianBusEntity obj) { ZhanNeiXinJianInsert exec = new ZhanNeiXinJianInsert(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return true; } catch (Exception ex) { //throw ex; return false; } finally { obj = null; } }
// 公用静态方法,修改一条记录 UpdateZhanNeiXinJian public static bool UpdateEntity(ZhanNeiXinJianBusEntity obj) { if (obj == null || obj.IsEmpty) { return false; } ZhanNeiXinJianUpdate exec = new ZhanNeiXinJianUpdate(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return true; } catch (Exception ex) { //throw ex; return false; } finally { obj = null; } }
// 修改由实体指定的一条记录 ModifyZhanNeiXinJian public bool Modify(ZhanNeiXinJianBusEntity obj) { return UpdateEntity(obj); }
// 添加由实体指定的一条记录 AddZhanNeiXinJian public bool Add(ZhanNeiXinJianBusEntity obj) { return InsertEntity(obj); }