public ActionResult SubmitForm(ProjectEntity entity, string keyValue) { try { projectApp.SubmitForm(entity, keyValue); if (string.IsNullOrEmpty(keyValue)) { WirteOperationRecord("Project", "INSERT", "增加", "Info:" + entity.ToJson()); } else { WirteOperationRecord("Project", "UPDATE", "修改", "Info:" + entity.ToJson()); } } catch (Exception ex) { log.logType = "ERROR"; log.logLevel = "ERROR"; WirteOperationRecord("Project", "", "", "Info:" + ex.Message.ToString()); return(Error(ex.Message.ToString())); } return(Success("操作成功.")); }
public ActionResult GetFormJson(string keyValue) { var entity = new ProjectEntity(); try { entity = projectApp.FindList(c => c.projectGuid == keyValue).FirstOrDefault(); WirteOperationRecord("Project", "SELECT", "查询", "Info:获取项目资料(单个)"); } catch (Exception ex) { log.logType = "ERROR"; log.logLevel = "ERROR"; WirteOperationRecord("Project", "", "", "Info:" + ex.Message.ToString()); } return(Content(entity.ToJson())); }
public ActionResult GetFormJson(string keyValue) { ProjectEntity projectEntity = projectApp.GetForm(keyValue); return(Content(projectEntity.ToJson())); }