CRM_EasyUI_2016/Controllers/CRM_ModuleController.cs

(开头部分) 9KB

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

namespace CRM_EasyUI_2016.Controllers
{
    using GroupThink.CRM.Common;
    using GroupThink.CRM.IBLL;
    using GroupThink.CRM.Model.Sys;
    using Microsoft.Practices.Unity;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.CompilerServices;
    using System.Web.Mvc;
    using CRM_EasyUI_2016.Core;

    public class CRM_ModuleController : BaseController
    {    
        private ValidationErrors errors = new ValidationErrors();

        [HttpPost]
        public JsonResult Create(CRM_Module_Model model)
        {
            model.CreateTime = new DateTime?(DateTime.Now);
            model.CreateUserID = base.GetCurrentUserId();
            if ((model != null) && base.ModelState.IsValid)
            {
                string error;
                if (this.m_BLL.IsExist(model.ID))
                {
                    error = "此模块ID已存在,请输入一个不同的ID!";
                    return base.Json(JsonHandler.CreateMessage(0, Suggestion.InsertFail + ": " + error));
                }
                if (this.m_BLL.Create(ref this.errors, model))
                {
                    return base.Json(JsonHandler.CreateMessage(1, Suggestion.InsertSucceed));
                }
                error = this.errors.Error;
                return base.Json(JsonHandler.CreateMessage(0, Suggestion.InsertFail + error));
            }
            return base.Json(JsonHandler.CreateMessage(0, Suggestion.InsertFail));
        }

        //[SupportFilter]
        public ActionResult Create(string id)
        {
            ((dynamic) base.ViewBag).Perm = base.GetPermission();
            CRM_Module_Model model2 = new CRM_Module_Model {
                ParentID = id,
                Enable = true,
                Sort = 0
            };
            CRM_Module_Model model = model2;
            return base.View(model);
        }

        [HttpPost]
        public JsonResult CreateOpt(CRM_ModuleOperate_Model info)
        {
            if ((info != null) && base.ModelState.IsValid)
            {
                if (this.m_operateBLL.GetById(info.ID).ID!= null)
                {
后面还有 173 行代码,购买后查看完整代码

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

AI 解读

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

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