Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            ReportIndex report = new ReportIndex();

            ReportTab.Content = report;
        }
Ejemplo n.º 2
0
        public ActionResult Viewer(int?id, int?detailID)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            ReportIndex reportIndex = this.reportAPIRepository.GetEntityIndexes <ReportIndex>(User.Identity.GetUserId(), HomeSession.GetGlobalFromDate(this.HttpContext), HomeSession.GetGlobalToDate(this.HttpContext)).Where(w => w.ReportUniqueID == id).FirstOrDefault();

            if (reportIndex == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            PrintViewModel printViewModel = new PrintViewModel()
            {
                Id = id, DetailID = detailID, PrintOptionID = reportIndex.PrintOptionID, LocationID = this.reportService.LocationID, ReportPath = reportIndex.ReportURL
            };

            printViewModel.FromDate = HomeSession.GetReportFromDate(this.HttpContext);
            printViewModel.ToDate   = HomeSession.GetReportToDate(this.HttpContext);

            return(View(viewName: "Viewer", model: printViewModel));
        }