// 根据主键ID返回指定的WenZhangLiuYan实体 public static WenZhangLiuYanBusEntity GetEntity(int ID) { WenZhangLiuYanByPK exec = new WenZhangLiuYanByPK(); exec.ID = ID; WenZhangLiuYanBusEntity obj = new WenZhangLiuYanBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return(obj); }
// 公用静态方法,插入一条记录 InsertWenZhangLiuYan public static bool InsertEntity(WenZhangLiuYanBusEntity obj) { WenZhangLiuYanInsert exec = new WenZhangLiuYanInsert(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return(true); } catch (Exception ex) { //throw ex; return(false); } finally { obj = null; } }
// 公用静态方法,修改一条记录 UpdateWenZhangLiuYan public static bool UpdateEntity(WenZhangLiuYanBusEntity obj) { if (obj == null || obj.IsEmpty) { return(false); } WenZhangLiuYanUpdate exec = new WenZhangLiuYanUpdate(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return(true); } catch (Exception ex) { //throw ex; return(false); } finally { obj = null; } }
// 修改由实体指定的一条记录 ModifyWenZhangLiuYan public bool Modify(WenZhangLiuYanBusEntity obj) { return(UpdateEntity(obj)); }
// 添加由实体指定的一条记录 AddWenZhangLiuYan public bool Add(WenZhangLiuYanBusEntity obj) { return(InsertEntity(obj)); }