示例#1
0
 // 根据主键ID返回指定的QiYeLeiXing实体
 public static QiYeLeiXingBusEntity GetEntity(int ID)
 {
     QiYeLeiXingByPK exec = new QiYeLeiXingByPK();
     exec.ID = ID;
     QiYeLeiXingBusEntity obj = new QiYeLeiXingBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
示例#2
0
 // 公用静态方法,插入一条记录 InsertQiYeLeiXing
 public static bool InsertEntity(QiYeLeiXingBusEntity obj)
 {
     QiYeLeiXingInsert exec = new QiYeLeiXingInsert();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
示例#3
0
 // 公用静态方法,修改一条记录 UpdateQiYeLeiXing
 public static bool UpdateEntity(QiYeLeiXingBusEntity obj)
 {
     if (obj == null || obj.IsEmpty)
     {
         return false;
     }
     QiYeLeiXingUpdate exec = new QiYeLeiXingUpdate();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
示例#4
0
 // 修改由实体指定的一条记录 ModifyQiYeLeiXing
 public bool Modify(QiYeLeiXingBusEntity obj)
 {
     return UpdateEntity(obj);
 }
示例#5
0
 // 添加由实体指定的一条记录 AddQiYeLeiXing
 public bool Add(QiYeLeiXingBusEntity obj)
 {
     return InsertEntity(obj);
 }