CRM_EasyUI_2016/Controllers/CRM_RoleController.cs

(开头部分) 13KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CRM_EasyUI_2016.Core;
using GroupThink.CRM.IBLL;
using GroupThink.CRM.Common;
using GroupThink.CRM.Model.Sys;

namespace CRM_EasyUI_2016.Controllers
{
    public class CRM_RoleController : BaseController
    {
        [Microsoft.Practices.Unity.Dependency]
        public ICRM_Role_BLL m_BLL { get; set; }
        [Microsoft.Practices.Unity.Dependency]
        public ICRM_Dept_BLL d_BLL { get; set; }
        [Microsoft.Practices.Unity.Dependency]
        public ICRM_User_BLL u_BLL { get; set; }

        [Microsoft.Practices.Unity.Dependency]
        public ICRM_RoleUser_BLL ru_BLL { get; set; }
        ValidationErrors errors = new ValidationErrors();
        //
        // GET: /CRM_Role/

        public ActionResult Index()
        {
            return View();
        }
        public string InitTree()
        {
            string str = "{\"id\":\"0\",\"text\":\"--顶级菜单--\",\"ParentId\":\"0 \"},";
            IList<CRM_Role_Model> list = (from t in this.m_BLL.GetList_(0)
                                                     where t.Enable != false
                                                     select t).ToList<CRM_Role_Model>();
            foreach (CRM_Role_Model model in list)
            {
                str = str + this.Recursion(model) + ",";
            }
            return ("[" + str.TrimEnd(new char[] { ',' }) + "]");
        }

        public string InitTreeByDepID(int depId)
        {
            string str = "{\"id\":\"0\",\"text\":\"--顶级菜单--\",\"ParentId\":\"0 \"},";
            IList<CRM_Role_Model> list = (from t in this.m_BLL.GetList_(depId, 0)
                                                     where t.Enable != false
                                                     select t).ToList<CRM_Role_Model>();
            foreach (CRM_Role_Model model in list)
            {
                str = str + this.Recursion1(model) + ",";
            }
            return ("[" + str.TrimEnd(new char[] { ',' }) + "]");
        }
        public string Recursion1(CRM_Role_Model model)
        {
            string str = "";
            string str3 = str;
后面还有 307 行代码,购买后查看完整代码

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

AI 解读

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

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