Esempio n. 1
0
        public static VMUserInfo UserInfo(SystemDM UserInfos, int No)
        {
            VMUserInfo item1 = new VMUserInfo();

            item1.NO        = No;
            item1.UserID    = UserInfos.UserID;
            item1.UserName  = UserInfos.UserName;
            item1.UserLevel = UserInfos.UserLevel;
            switch (UserInfos.UserCategory)
            {
            case UserRole.Admin:
                item1.UserCategory = "系统管理员";
                break;

            case UserRole.InstallAdmin:
                item1.UserCategory = "安装需求管理员";
                break;
            }
            switch (UserInfos.UserState)
            {
            case UserState.Able:
                item1.UserState = "启用";
                break;

            case UserState.DisAble:
                item1.UserState = "未启用";
                break;
            }
            return(item1);
        }
Esempio n. 2
0
        //用户详细
        public SystemDM UserDetail(String UserID)
        {
            SystemDM user = new SystemDM();
            var      list = db.UserInfo.Find(UserID);

            user.UserID       = list.UserID;
            user.UserLevel    = list.UserLevel;
            user.UserCategory = list.UserCategory;
            user.UserState    = list.UserState;
            user.UserName     = list.UserName;
            //user.UserPassword = list.UserPassword;
            return(user);
        }