public async Task <IHttpActionResult> Create([FromBody, CustomizeValidator(RuleSet = "Create")] ReportNew reportNew) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var reportDto = _mapper.Map <ReportDto>(reportNew); reportDto = await _reportService.CreateAsync(reportDto); if (reportDto == null) { return(BadRequest()); } reportNew = _mapper.Map <ReportNew>(reportDto); return(Ok(reportNew)); } catch (InvalidOperationException ioe) { return(InternalServerError(ioe)); } }
/// <summary> /// Gets a example of model view report. /// </summary> /// <returns></returns> public virtual object GetExamples() { var value = new ReportNew() { Name = "Number of requests per day", Description = "The dynamics of the number of requests per day", }; return(value); }
private void btnBack_Click(object sender, EventArgs e) { try { var back = new ReportNew(); back.Show(); this.Hide(); } catch (Exception) { } }
private void radReport_CheckedChanged(object sender, EventArgs e) { try { var Report = new ReportNew(); Report.Show(); this.Hide(); } catch (Exception) { } }