示例#1
0
        //
        public static UserInfo GetUserById(string UserId)
        {
            DataTable table    = new DAL.UserInfo().Select(UserId);
            UserInfo  userInfo = new UserInfo();

            foreach (DataRow row in table.Rows)
            {
                Adapt.Convert.ConvertDataRowToObject(row, userInfo);
            }
            return(userInfo);
        }
示例#2
0
        //Login
        public static UserInfo LoginInfo(string loginName, string password)
        {
            DataTable table    = new DAL.UserInfo().Select(loginName, password);
            UserInfo  userInfo = new UserInfo();

            foreach (DataRow row in table.Rows)
            {
                Adapt.Convert.ConvertDataRowToObject(row, userInfo);
            }
            return(userInfo);
        }
示例#3
0
        //
        public static List <string> GetAuthority(Guid userIdentity)
        {
            List <string> value = new List <string>();
            DataTable     table = new DAL.UserInfo().SelectAuthority(userIdentity);

            foreach (DataRow row in table.Rows)
            {
                value.Add(row["caption"].ToString());
            }
            return(value);
        }
示例#4
0
        ///用户列表
        public static DataTable GetDataByID(bool hasBlankItem = false)
        {
            DataTable dt = new DAL.UserInfo().SelectList();

            if (hasBlankItem)
            {
                DataRow dr = dt.NewRow();
                dr["real_name"]    = string.Empty;
                dr["userIdentity"] = Guid.Empty;
                dt.Rows.InsertAt(dr, 0);
            }
            return(dt);
        }
示例#5
0
        //ID
        public static string GetRealNameByID(Guid Id)
        {
            string RealName = new DAL.UserInfo().Select(Id);

            return(RealName);
        }
示例#6
0
        public static DataTable GetDataByRole(Guid RoleID)
        {
            DataTable dt = new DAL.UserInfo().SelectListByRole(RoleID);

            return(dt);
        }