Exemplo n.º 1
0
        public ActionResult Viewer(int id)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(Redirect("~/"));
            }
            ReportViewModel model = new ReportViewModel();

            model.GetReport(id);
            model.ParamList       = model.GetReportParams(id);
            model.AgreementNumber = Security.GetMemberID();
            model.ContactName     = Security.GetFullName();

            return(View(model));
        }
Exemplo n.º 2
0
        // GET: Admin/Report/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            ReportViewModel model = new ReportViewModel();

            model.ReportID = id ?? 0;
            model          = model.GetReport(model);

            if (model == null)
            {
                return(HttpNotFound());
            }

            model.RolesList = model.GetEditRoles(id ?? 0);
            model.ParamList = model.GetReportParams(id ?? 0);
            return(View(model));
        }