Esempio n. 1
0
 // 根据主键ID返回指定的BaoJiaFangShi实体
 public static BaoJiaFangShiBusEntity GetEntity(int ID)
 {
     BaoJiaFangShiByPK exec = new BaoJiaFangShiByPK();
     exec.ID = ID;
     BaoJiaFangShiBusEntity obj = new BaoJiaFangShiBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
Esempio n. 2
0
 // 公用静态方法,插入一条记录 InsertBaoJiaFangShi
 public static bool InsertEntity(BaoJiaFangShiBusEntity obj)
 {
     BaoJiaFangShiInsert exec = new BaoJiaFangShiInsert();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Esempio n. 3
0
 // 公用静态方法,修改一条记录 UpdateBaoJiaFangShi
 public static bool UpdateEntity(BaoJiaFangShiBusEntity obj)
 {
     if (obj == null || obj.IsEmpty)
     {
         return false;
     }
     BaoJiaFangShiUpdate exec = new BaoJiaFangShiUpdate();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Esempio n. 4
0
 // 修改由实体指定的一条记录 ModifyBaoJiaFangShi
 public bool Modify(BaoJiaFangShiBusEntity obj)
 {
     return UpdateEntity(obj);
 }
Esempio n. 5
0
 // 添加由实体指定的一条记录 AddBaoJiaFangShi
 public bool Add(BaoJiaFangShiBusEntity obj)
 {
     return InsertEntity(obj);
 }