Exemple #1
0
        // 根据主键ID返回指定的XiangMuJieDuan实体
        public static XiangMuJieDuanBusEntity GetEntity(int ID)
        {
            XiangMuJieDuanByPK exec = new XiangMuJieDuanByPK();

            exec.ID = ID;
            XiangMuJieDuanBusEntity obj = new XiangMuJieDuanBusEntity();

            obj.MetaDataTable = exec.ExecDataTable();
            return(obj);
        }
Exemple #2
0
        // 公用静态方法,插入一条记录 InsertXiangMuJieDuan
        public static bool InsertEntity(XiangMuJieDuanBusEntity obj)
        {
            XiangMuJieDuanInsert exec = new XiangMuJieDuanInsert();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
Exemple #3
0
        // 公用静态方法,修改一条记录 UpdateXiangMuJieDuan
        public static bool UpdateEntity(XiangMuJieDuanBusEntity obj)
        {
            if (obj == null || obj.IsEmpty)
            {
                return(false);
            }
            XiangMuJieDuanUpdate exec = new XiangMuJieDuanUpdate();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
Exemple #4
0
 // 修改由实体指定的一条记录 ModifyXiangMuJieDuan
 public bool Modify(XiangMuJieDuanBusEntity obj)
 {
     return(UpdateEntity(obj));
 }
Exemple #5
0
 // 添加由实体指定的一条记录 AddXiangMuJieDuan
 public bool Add(XiangMuJieDuanBusEntity obj)
 {
     return(InsertEntity(obj));
 }