예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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;
     }
 }
예제 #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;
            }
        }
예제 #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;
     }
 }
예제 #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;
            }
        }
예제 #11
0
 // 修改由实体指定的一条记录 ModifyUsers
 public bool Modify(UsersBusEntity obj)
 {
     return(UpdateEntity(obj));
 }
예제 #12
0
 // 添加由实体指定的一条记录 AddUsers
 public bool Add(UsersBusEntity obj)
 {
     return(InsertEntity(obj));
 }
예제 #13
0
 // 修改由实体指定的一条记录 ModifyUsers
 public bool Modify(UsersBusEntity obj)
 {
     return UpdateEntity(obj);
 }
예제 #14
0
 // 添加由实体指定的一条记录 AddUsers
 public bool Add(UsersBusEntity obj)
 {
     return InsertEntity(obj);
 }