Ejemplo n.º 1
0
        // 根据主键ID返回指定的XiangMuFenLei实体
        public static XiangMuFenLeiBusEntity GetEntity(int ID)
        {
            XiangMuFenLeiByPK exec = new XiangMuFenLeiByPK();

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

            obj.MetaDataTable = exec.ExecDataTable();
            return(obj);
        }
Ejemplo n.º 2
0
        // 公用静态方法,插入一条记录 InsertXiangMuFenLei
        public static bool InsertEntity(XiangMuFenLeiBusEntity obj)
        {
            XiangMuFenLeiInsert exec = new XiangMuFenLeiInsert();

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

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