Ejemplo n.º 1
0
 public ActionResult SubmitForm(ItemsEntity itemsEntity, string keyValue)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         var itemDetail = itemsApp.GetForm(keyValue);
         itemDetail.F_ParentId    = itemsEntity.F_ParentId;
         itemDetail.F_FullName    = itemsEntity.F_FullName;
         itemDetail.F_SortCode    = itemsEntity.F_SortCode;
         itemDetail.F_EnCode      = itemsEntity.F_EnCode;
         itemDetail.F_EnabledMark = itemsEntity.F_EnabledMark;
         itemDetail.F_Description = itemsEntity.F_Description;
         itemsApp.SubmitForm(itemDetail, keyValue);
     }
     else
     {
         itemsApp.SubmitForm(itemsEntity, keyValue);
     }
     return(Success("操作成功。"));
 }
 public ActionResult SubmitForm(ItemsEntity itemsEntity, string keyValue)
 {
     try
     {
         itemsApp.SubmitForm(itemsEntity, keyValue);
         return(Success("操作成功。"));
     }
     catch (Exception ex)
     {
         return(Error(ex.Message));
     }
 }
Ejemplo n.º 3
0
        public ActionResult SubmitForm(ItemsEntity itemsEntity, string keyValue)
        {
            itemsApp.SubmitForm(itemsEntity, keyValue);
            if (!string.IsNullOrEmpty(keyValue))
            {
                base.OperateLog("分类编辑:F_Id:" + keyValue, "/SystemManage/ItemsType/SubmitForm", "分类管理", Application.DbLogType.Update);
            }
            else
            {
                base.OperateLog("新增分类:" + itemsEntity.F_FullName, "/SystemManage/ItemsType/SubmitForm", "分类管理", Application.DbLogType.Create);
            }

            return(Success("操作成功。"));
        }
Ejemplo n.º 4
0
        public ActionResult SubmitForm(ItemsEntity itemsEntity, string keyValue)
        {
            var       module = new ModuleApp().GetList().Where(a => a.F_Layers == 1 && a.F_EnCode == moduleName).FirstOrDefault();
            LogEntity logEntity;

            if (string.IsNullOrEmpty(keyValue))
            {
                itemsEntity.F_DeleteMark = false;
                itemsEntity.F_IsTree     = false;
                logEntity = new LogEntity(module.F_FullName, "字典分类", DbLogType.Create.ToString());
                logEntity.F_Description += DbLogType.Create.ToDescription();
            }
            else
            {
                logEntity = new LogEntity(module.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 (string.IsNullOrEmpty(keyValue))
                {
                }
                if (itemsEntity.F_ParentId == "0")
                {
                    itemsEntity.F_Layers = 1;
                }
                else
                {
                    itemsEntity.F_Layers = itemsApp.GetForm(itemsEntity.F_ParentId).F_Layers + 1;
                }
                itemsApp.SubmitForm(itemsEntity, 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(ItemsEntity itemsEntity, string keyValue)
 {
     itemsApp.SubmitForm(itemsEntity, keyValue);
     return(Success("操作成功。"));
 }