public ReportDto CreateReport(ReportDto reportDto)
        {
            var report = new Report(reportDto.ReportName, reportDto.DisplayName, reportDto.Description,
                reportDto.RdbmsId, reportDto.Schema, reportDto.CreatedBy);
            this._reportRepository.Add(report);

            return report.MapAs<ReportDto>();
        }
        public ActionResult CreateReport(ReportDto model)
        {
            using (var service = ServiceLocator.Instance.Resolve<IReportService>())
            {
                // check whether has existed repeat report name
                var isExistReport = service.ExistReport(model.ReportName);
                if (isExistReport)
                    return Json(false, string.Format("The report name:[{0}] already exists.", model.ReportName));

                // Create the report header
                model.CreatedBy = this.LoginUser.Identity.Name;
                var report = service.CreateReport(model);

                return Json(true, report);
            }
        }
 private void GetTableOrViewName(Guid tableOrViewId)
 {
     this.report = this._reportQueryServiceContract.GetReport(tableOrViewId, false);
     if (report == null)
         throw new Exception(String.Format("The table collection is not exists the table id [{0}].",
             tableOrViewId.ToString()));
 }
 public ActionResult CreateReport()
 {
     var model = new ReportDto {Schema = "dbo"};
     this.GetViewBags();
     return PartialView(model);
 }