CRM_EasyUI_2016/Controllers/CRM_DeptController.cs

(开头部分) 8KB

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

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

namespace CRM_EasyUI_2016.Controllers
{
    public class CRM_DeptController : BaseController
    {
        [Microsoft.Practices.Unity.Dependency]
        public ICRM_Dept_BLL m_BLL { get; set; }

        private ValidationErrors errors = new ValidationErrors();
        //
        // GET: /CRM_Dept/

        #region 列表
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public JsonResult GetList(GridPager pager)
        {
            List<CRM_Dept_Model> list = this.m_BLL.GetList(ref pager);
            var json = new
            {
                total = pager.totalRows,
                rows = (from r in list
                        select new CRM_Dept_Model()
                        {
                            DeptID = r.DeptID,
                            DeptName = r.DeptName,
                            Des = r.Des,
                            IsEnable = (bool)r.IsEnable,
                            ParentID = r.ParentID,
                            IsDelete = r.IsDelete
                        }).ToArray()
            };
            return Json(json, JsonRequestBehavior.AllowGet);

        }

        [HttpPost]
        public JsonResult GetList_(string id)
        {
            if (id == null)
                id = "0";
            List<CRM_Dept_Model> list = m_BLL.GetList_(int.Parse(id));
            var json = from r in list
                       select new CRM_Dept_Model()
                       {
                           DeptID = r.DeptID,
                           DeptName = r.DeptName,
后面还有 188 行代码,购买后查看完整代码

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

AI 解读

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

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