Пример #1
0
        // 根据主键ID返回指定的YunShuFangShi实体
        public static YunShuFangShiBusEntity GetEntity(int ID)
        {
            YunShuFangShiByPK exec = new YunShuFangShiByPK();

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

            obj.MetaDataTable = exec.ExecDataTable();
            return(obj);
        }
Пример #2
0
        // 公用静态方法,插入一条记录 InsertYunShuFangShi
        public static bool InsertEntity(YunShuFangShiBusEntity obj)
        {
            YunShuFangShiInsert exec = new YunShuFangShiInsert();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
Пример #3
0
        // 公用静态方法,修改一条记录 UpdateYunShuFangShi
        public static bool UpdateEntity(YunShuFangShiBusEntity obj)
        {
            if (obj == null || obj.IsEmpty)
            {
                return(false);
            }
            YunShuFangShiUpdate exec = new YunShuFangShiUpdate();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
Пример #4
0
 // 修改由实体指定的一条记录 ModifyYunShuFangShi
 public bool Modify(YunShuFangShiBusEntity obj)
 {
     return(UpdateEntity(obj));
 }
Пример #5
0
 // 添加由实体指定的一条记录 AddYunShuFangShi
 public bool Add(YunShuFangShiBusEntity obj)
 {
     return(InsertEntity(obj));
 }