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