Ejemplo n.º 1
0
 public ActionResult SubmitForm(ModuleEntity moduleEntity, string keyValue)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         var role = moduleApp.GetForm(keyValue);
         role.F_ParentId    = moduleEntity.F_ParentId;
         role.F_FullName    = moduleEntity.F_FullName;
         role.F_EnCode      = moduleEntity.F_EnCode;
         role.F_UrlAddress  = moduleEntity.F_UrlAddress;
         role.F_SortCode    = moduleEntity.F_SortCode;
         role.F_EnabledMark = moduleEntity.F_EnabledMark;
         role.F_AllowEdit   = moduleEntity.F_AllowEdit;
         role.F_AllowDelete = moduleEntity.F_AllowDelete;
         role.F_Description = moduleEntity.F_Description;
         role.F_IsMenu      = moduleEntity.F_IsMenu;
         role.F_IsPublic    = moduleEntity.F_IsPublic;
         role.F_IsExpand    = moduleEntity.F_IsExpand;
         role.F_Target      = moduleEntity.F_Target;
         role.F_Icon        = moduleEntity.F_Icon;
         moduleApp.SubmitForm(role, keyValue);
     }
     else
     {
         moduleEntity.F_DeleteMark = false;
         moduleApp.SubmitForm(moduleEntity, keyValue);
     }
     return(Success("操作成功。"));
 }
Ejemplo n.º 2
0
 public ActionResult SubmitForm(ModuleEntity moduleEntity, string keyValue)
 {
     try
     {
         moduleApp.SubmitForm(moduleEntity, keyValue);
         return(Success("操作成功。"));
     }
     catch (Exception ex)
     {
         return(Error(ex.Message));
     }
 }
 public ActionResult SubmitForm(ModuleEntity moduleEntity, string keyValue)
 {
     moduleApp.SubmitForm(moduleEntity, keyValue);
     if (!string.IsNullOrEmpty(keyValue))
     {
         base.OperateLog("菜单编辑:F_Id:" + keyValue, "/SystemManage/Module/SubmitForm", "菜单管理", Application.DbLogType.Update);
     }
     else
     {
         base.OperateLog("新增菜单:" + moduleEntity.F_FullName, "/SystemManage/Module/SubmitForm", "菜单管理", Application.DbLogType.Create);
     }
     return(Success("操作成功。"));
 }
Ejemplo n.º 4
0
        public ActionResult SubmitForm(ModuleEntity moduleEntity, string keyValue)
        {
            var       modules    = new ModuleApp().GetList().Where(a => a.F_Layers == 1);
            var       module     = new ModuleApp().GetList().Where(a => a.F_Layers == 1 && a.F_EnCode == moduleName).FirstOrDefault();
            var       moduleitem = new ModuleApp().GetList().Where(a => a.F_Layers > 1 && a.F_EnCode == className.Substring(0, className.Length - 10)).FirstOrDefault();
            LogEntity logEntity;

            if (string.IsNullOrEmpty(keyValue))
            {
                moduleEntity.F_DeleteMark  = false;
                moduleEntity.F_AllowEdit   = false;
                moduleEntity.F_AllowDelete = false;
                logEntity = new LogEntity(module.F_FullName, moduleitem.F_FullName, DbLogType.Create.ToString());
                logEntity.F_Description += DbLogType.Create.ToDescription();
            }
            else
            {
                //前端传值为null,更新的时候null不更新
                if (moduleEntity.F_Icon == null)
                {
                    moduleEntity.F_Icon = "";
                }
                logEntity = new LogEntity(module.F_FullName, moduleitem.F_FullName, DbLogType.Update.ToString());
                logEntity.F_Description += DbLogType.Update.ToDescription();
                logEntity.F_KeyValue     = keyValue;
            }
            try
            {
                logEntity.F_Account  = OperatorProvider.Provider.GetCurrent().UserCode;
                logEntity.F_NickName = OperatorProvider.Provider.GetCurrent().UserName;
                if (moduleEntity.F_ParentId == "0")
                {
                    moduleEntity.F_Layers = 1;
                }
                else
                {
                    moduleEntity.F_Layers = moduleApp.GetForm(moduleEntity.F_ParentId).F_Layers + 1;
                }
                moduleApp.SubmitForm(moduleEntity, keyValue);
                logEntity.F_Description += "操作成功";
                new LogApp().WriteDbLog(logEntity);
                return(Success("删除成功。"));
            }
            catch (Exception ex)
            {
                logEntity.F_Result       = false;
                logEntity.F_Description += "操作失败," + ex.Message;
                new LogApp().WriteDbLog(logEntity);
                return(Error(ex.Message));
            }
        }
Ejemplo n.º 5
0
 public ActionResult SubmitForm(ModuleEntity moduleEntity, string keyValue)
 {
     moduleApp.SubmitForm(moduleEntity, keyValue);
     return(Success("操作成功。"));
 }