示例#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);
 }