示例#1
0
        /// <summary>
        /// 选择发送用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public PartialViewResult SelectUser(int id)
        {
            ZC_RoleController zc_role = new ZC_RoleController();

            //查询接收文件的用户
            string selected_users = zc_role.GenerateStringFromList(db.T_NB_File.Find(id).ReceiveUsers.Where(p => p.IsValid == true).ToList());
            ViewBag.selected_users = selected_users;

            var select_user = new VM_SelectUser();
            select_user.Users = db.T_ZC_User.Where(p => p.IsValid == true).ToList();
            select_user.Departments = db.T_ZC_Department.Where(p => p.IsValid == true).ToList();

            ViewBag.FileId = id;
            return PartialView(select_user);
        }
示例#2
0
        public PartialViewResult SelectUser(int id)
        {
            string selected_users = GenerateStringFromList(db.T_ZC_Role.Find(id).Users.Where(p => p.IsValid == true && p.UseLevel == (int)UseLevel.System).ToList());
            ViewBag.selected_users = selected_users;

            var select_user = new VM_SelectUser();
            select_user.Users = db.T_ZC_User.Where(p => p.IsValid == true).ToList();
            select_user.Departments = db.T_ZC_Department.Where(p => p.IsValid == true).ToList();

            ViewBag.RoleID = id;
            return PartialView(select_user);
        }
示例#3
0
 public PartialViewResult SelectUsers()
 {
     var depart_user = new VM_SelectUser();
     depart_user.Departments = db.T_ZC_Department.Where(p => p.IsValid == true && p.UseLevel == (int)UseLevel.System).ToList();
     depart_user.Users = db.T_ZC_User.Where(p => p.IsValid == true && p.UseLevel == (int)UseLevel.System).Include("Department").ToList();
     return PartialView(depart_user);
 }