예제 #1
0
 // 根据主键ID返回指定的PinDaoSheZhi实体
 public static PinDaoSheZhiBusEntity GetEntity(int ID)
 {
     PinDaoSheZhiByPK exec = new PinDaoSheZhiByPK();
     exec.ID = ID;
     PinDaoSheZhiBusEntity obj = new PinDaoSheZhiBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
예제 #2
0
 // 公用静态方法,插入一条记录 InsertPinDaoSheZhi
 public static bool InsertEntity(PinDaoSheZhiBusEntity obj)
 {
     PinDaoSheZhiInsert exec = new PinDaoSheZhiInsert();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
예제 #3
0
 // 公用静态方法,修改一条记录 UpdatePinDaoSheZhi
 public static bool UpdateEntity(PinDaoSheZhiBusEntity obj)
 {
     if (obj == null || obj.IsEmpty)
     {
         return false;
     }
     PinDaoSheZhiUpdate exec = new PinDaoSheZhiUpdate();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
예제 #4
0
 // 修改由实体指定的一条记录 ModifyPinDaoSheZhi
 public bool Modify(PinDaoSheZhiBusEntity obj)
 {
     return UpdateEntity(obj);
 }
예제 #5
0
 // 添加由实体指定的一条记录 AddPinDaoSheZhi
 public bool Add(PinDaoSheZhiBusEntity obj)
 {
     return InsertEntity(obj);
 }