WebHost/Controllers/RoleMenuFunctionController.cs

(开头部分) 11KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Domain;
using ViewModel;
using IService;
using Common;
using System.Text;
using Newtonsoft.Json;
using WebUI.Extention;

namespace WebUI.Controllers
{
    public class RoleMenuFunctionController : BaseController
    {
        #region 属性对象定义
        public IMenuService menuService { get; set; }
        public IRolesService rolesService { get; set; }
        public IRoleMenuFunctionService roleMenuFunctionService { get; set; }
        public IUserRoleService UserRoleService { get; set; }
        public IShopServer shopServer { get; set; }
        public RoleMenuFunctionController(IMenuService menuService, IRoleMenuFunctionService roleMenuFunctionService, IRolesService rolesService, IShopServer shopServer, IUserRoleService UserRoleService)
        {
            this.menuService = menuService;
            this.roleMenuFunctionService = roleMenuFunctionService;
            this.rolesService = rolesService;
            this.shopServer = shopServer;
            this.UserRoleService = UserRoleService;
        }

        /// <summary>
        /// 绑定下拉框角色数据
        /// </summary>
        /// <returns></returns>
        public ActionResult _GetRoleDropList()
        {
            var ShopId = Sys_Shop_User.ShopID;
            if (ShopId == "")
            {
                List<RolesView> lstMol = lstMol = rolesService.GetValidAll().ToList();
                if (lstMol != null)
                {
                    var mols = lstMol.Select(n => new { n.ID, n.Name });
                    return Json(mols);
                }
                else
                    return Json(new List<RolesView>());
            }
            else
            {
                var response = rolesService.GetRoleByShopID(ShopId);
                if (response != null && response.Count > 0)
                {
                    var Roledate = response.Select(n => new { n.ID, n.Name });
                    return Json(Roledate);
                }
                else
                {
后面还有 256 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。