Example #1
0
 // 根据主键userID返回指定的Users实体
 public static UsersBusEntity GetEntity(string userName)
 {
     UsersByUserName exec = new UsersByUserName();
     exec.Username = userName;
     UsersBusEntity obj = new UsersBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
Example #2
0
 // 根据主键userID返回指定的Users实体
 public static UsersBusEntity GetEntity(int userID)
 {
     UsersByPK exec = new UsersByPK();
     exec.UserID = userID;
     UsersBusEntity obj = new UsersBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
Example #3
0
 // 根据主键userName和userPwd返回指定的Users实体
 public static UsersBusEntity GetEntity(string userName,string userPwd)
 {
     UsersByUserNameAndUserPwd exec = new UsersByUserNameAndUserPwd();
     exec.Username = userName;
     exec.Userpwd = userPwd;
     UsersBusEntity obj = new UsersBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
Example #4
0
        // 根据主键userID返回指定的Users实体
        public static UsersBusEntity GetEntity(string userName)
        {
            UsersByUserName exec = new UsersByUserName();

            exec.Username = userName;
            UsersBusEntity obj = new UsersBusEntity();

            obj.MetaDataTable = exec.ExecDataTable();
            return(obj);
        }
Example #5
0
        // 根据主键userID返回指定的Users实体
        public static UsersBusEntity GetEntity(int userID)
        {
            UsersByPK exec = new UsersByPK();

            exec.UserID = userID;
            UsersBusEntity obj = new UsersBusEntity();

            obj.MetaDataTable = exec.ExecDataTable();
            return(obj);
        }
Example #6
0
        // 根据主键userName和userPwd返回指定的Users实体
        public static UsersBusEntity GetEntity(string userName, string userPwd)
        {
            UsersByUserNameAndUserPwd exec = new UsersByUserNameAndUserPwd();

            exec.Username = userName;
            exec.Userpwd  = userPwd;
            UsersBusEntity obj = new UsersBusEntity();

            obj.MetaDataTable = exec.ExecDataTable();
            return(obj);
        }
Example #7
0
 // 公用静态方法,插入一条记录 InsertUsers
 public static bool InsertEntity(UsersBusEntity obj)
 {
     UsersInsert exec = new UsersInsert();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Example #8
0
        // 公用静态方法,插入一条记录 InsertUsers
        public static bool InsertEntity(UsersBusEntity obj)
        {
            UsersInsert exec = new UsersInsert();

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

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }
Example #11
0
 // 修改由实体指定的一条记录 ModifyUsers
 public bool Modify(UsersBusEntity obj)
 {
     return(UpdateEntity(obj));
 }
Example #12
0
 // 添加由实体指定的一条记录 AddUsers
 public bool Add(UsersBusEntity obj)
 {
     return(InsertEntity(obj));
 }
Example #13
0
 // 修改由实体指定的一条记录 ModifyUsers
 public bool Modify(UsersBusEntity obj)
 {
     return UpdateEntity(obj);
 }
Example #14
0
 // 添加由实体指定的一条记录 AddUsers
 public bool Add(UsersBusEntity obj)
 {
     return InsertEntity(obj);
 }