public ActionResult Test(string primaryKey, TestParamViewModel model) { list = new List <InGroupResultViewModel>(); var result = GroupRuleTest(model, primaryKey); if (result.Item1) { _procLogService.Insert(new PDP_PROC_LOG { SD_ID = ProjectProvider.Instance.Current.SD_ID, PROC_CAT_CODE = _procLogService.InGroupCatCode(), PROC_CONTENT_ID = primaryKey, START_TIME = model.startTime, END_TIME = model.endTime, PATIENT_ID = model.patientId, PROC_URL = model.url }); return(Success(result.Item2)); } else { _iErrorLogService.Insert(new PDP_ERROR_LOG { SD_ID = ProjectProvider.Instance.Current.SD_ID, PROC_TYPE = ConvertExeFlag("test"), //PROC_URL = //DLL_NAME = //CLASS_NAME = //FUNC_NAME = ERR_CONTENT = result.Item2, }); list = new List <InGroupResultViewModel>(); return(Error(result.Item2)); } }
public HttpResponseMessage Insert(ErrorLogAddRequest model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadGateway, ModelState)); } SuccessResponse response = new SuccessResponse(); try { _errorLogService.Insert(model); return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }
public HttpResponseMessage Add(ErrorLogAddRequest model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } ItemResponse <int> response = new ItemResponse <int>(); string userId = _userService.GetCurrentUserId(); if (string.IsNullOrEmpty(userId)) { userId = "18c5d19c-998a-4c5f-be05-1a3fa116d278"; } response.Item = _errorLogService.Insert(model, userId); return(Request.CreateResponse(HttpStatusCode.OK, response)); }