public ActionResult SubmitForm(RoleEntity roleEntity, string keyValue) { try { dutyApp.SubmitForm(roleEntity, keyValue); return(Success("操作成功。")); } catch (Exception ex) { return(Error(ex.Message)); } }
public ActionResult SubmitForm(RoleEntity roleEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { var organ = dutyApp.GetForm(keyValue); organ.F_OrganizeId = roleEntity.F_OrganizeId; organ.F_FullName = roleEntity.F_FullName; organ.F_FullName = roleEntity.F_FullName; organ.F_EnCode = roleEntity.F_EnCode; organ.F_SortCode = roleEntity.F_SortCode; organ.F_AllowEdit = roleEntity.F_AllowEdit; organ.F_AllowDelete = roleEntity.F_AllowDelete; organ.F_EnabledMark = roleEntity.F_EnabledMark; organ.F_Description = roleEntity.F_Description; dutyApp.SubmitForm(organ, keyValue); } else { dutyApp.SubmitForm(roleEntity, keyValue); } return(Success("操作成功。")); }
public ActionResult SubmitForm(RoleEntity roleEntity, string keyValue) { dutyApp.SubmitForm(roleEntity, keyValue); if (!string.IsNullOrEmpty(keyValue)) { base.OperateLog("编辑:F_Id:" + keyValue, "/SystemManage/Duty/Form", "岗位管理", Application.DbLogType.Update); } else { base.OperateLog("新建:F_Id:" + roleEntity.F_FullName, "/SystemManage/Duty/Form", "岗位管理", Application.DbLogType.Create); } return(Success("操作成功。")); }
public ActionResult SubmitForm(RoleEntity roleEntity, string keyValue) { 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)) { roleEntity.F_DeleteMark = false; roleEntity.F_AllowEdit = false; roleEntity.F_AllowDelete = false; logEntity = new LogEntity(module.F_FullName, moduleitem.F_FullName, DbLogType.Create.ToString()); logEntity.F_Description += DbLogType.Create.ToDescription(); } else { 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; dutyApp.SubmitForm(roleEntity, 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)); } }
public ActionResult SubmitForm(RoleEntity roleEntity, string keyValue) { dutyApp.SubmitForm(roleEntity, keyValue); return(Success("操作成功。")); }