public HttpResponseMessage Save([FromBody] ReportSettings Report) { if (Report.ID > 0) { return(Request.CreateResponse(HttpStatusCode.OK, Report.Update())); } else { return(Request.CreateResponse(HttpStatusCode.OK, Report.Save())); } }
private void InitializeRun(DateTime startDateTime, string runGuid = "") { _action.Safe(() => { _currentRunGuid = runGuid.Equals("") || runGuid.Equals("null") ? Guid.NewGuid() : Guid.Parse(runGuid); _currentRun = new Run(_currentRunGuid) { TestRunFiles = new List <string>(), RunSummary = new RunSummary() }; _currentTestRuns = new List <ITestRun>(); _currentRun.Name = Settings.RunName; _currentRun.Sprint = Settings.Sprint; _extractor.ExtractReportBase(); _currentRun.RunInfo.Start = startDateTime; ReportSettings.Save(Settings.OutputPath); }); }