bklLiudl
2024-07-23 675b8bcc4a3630d95e3d0b97d933e63442075ecb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using BLL;
using Common;
using Lib;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
 
namespace wms.Areas.SyetemSet.Controllers
{
    public class UserListController : MasterPage
    {
        // GET: SyetemSet/UserList
        [LoginFilter]
        public ActionResult Index()
        {
            ViewBag.Title = "员工管理";
            ViewBag.DepartList = LocalHelper.GetDepartList(string.Empty);
            ViewBag.RoleList = LocalHelper.GetRoleList(string.Empty);
            ViewBag.IsDel = LocalHelper.GetUserIsDelHtml();
            return View();
        }
        [LoginFilter]
        public ActionResult AddUser()
        {
            string userCode = Request.QueryString.Get("UserCode");
            if (userCode.IsEmpty())
            {
                ViewBag.DepartList = LocalHelper.GetDepartList(string.Empty);
                ViewBag.RoleList = LocalHelper.GetRoleList(string.Empty);
                ViewBag.Admin = new UserInfo();
 
            }
            else
            {
                DALUserInfo provider = new DALUserInfo();
                UserInfo entity = provider.GetModel(userCode);
                entity = entity == null ? new UserInfo() : entity;
                ViewBag.RoleList = LocalHelper.GetRoleList(entity.RoleNum);
                ViewBag.DepartList = LocalHelper.GetDepartList(entity.DepartNum);
                ViewBag.Admin = entity;
 
            }
            return View();
        }
 
        [LoginFilter]
        public ActionResult AdminPass()
        {
            string userCode = Request.QueryString.Get("UserCode");
            ViewBag.UserCode = "确认重置用户'"+userCode+"'的密码?";
            return View();
        }
        [LoginFilter]
        public ActionResult ChangePass()
        {
            ViewBag.UserCode = this.LoginUserCode;
            return View();
        }
    }
}