예제 #1
0
        public ActionResult FilterReportGrid(string id)
        {
            CustomReportsViewModel model = new CustomReportsViewModel();

            model.CustomReportGridList = model.GetCustomReports(0, 10, id);

            return(PartialView("_Grid", model));
        }
예제 #2
0
        public ActionResult EditCustomReport(CustomReportsViewModel model)
        {
            model.EditCustomReport(model);

            return(Json(new { success = true }));

            //            return PartialView("_CustomReportsEdit", model.GetCustomReport(model.CustomReportID));
        }
예제 #3
0
        public ActionResult RefreshReportGrid()
        {
            CustomReportsViewModel model = new CustomReportsViewModel();

            model.CustomReportGridList = model.GetCustomReports(0, 10);

            return(PartialView("_Grid", model));
        }
예제 #4
0
        public ActionResult AjaxPageGrid(int id, int?page = 0)
        {
            int currentPageIndex         = page.HasValue ? page.Value - 1 : 0;
            CustomReportsViewModel model = new CustomReportsViewModel();


            model.CustomReportGridList = model.GetCustomReports(page ?? 0, 10);

            return(PartialView("_Grid", model));
        }
예제 #5
0
        public ActionResult CustomReportDelete(int id, int?page = 0)
        {
            CustomReportsViewModel model = new CustomReportsViewModel();

            model.DeleteCustomReport(id);

            model.CustomReportGridList = model.GetCustomReports(page ?? 0, 10);

            return(PartialView("_ReportsGrid", model));
        }
예제 #6
0
        public ActionResult AjaxPage(int id, int?page, int size = 10, string sortOrder = "")
        {
            int currentPageIndex         = page.HasValue ? page.Value - 1 : 0;
            CustomReportsViewModel model = new CustomReportsViewModel();

            model.PageSize             = size;
            model.CustomReportGridList = model.GetCustomReports(currentPageIndex, 10);


            return(PartialView("_Grid", model));
        }
예제 #7
0
        public ActionResult EditParam(CustomParamViewModel model)
        {
            model.EditParamter(model);

            CustomReportsViewModel reportModel = new CustomReportsViewModel();

            reportModel.CustomReportID = model.CustomReportID;
            reportModel.ParamGridList  = model.GetParamGridList(model.CustomReportID);

            return(PartialView("_ParamList", reportModel));
        }
예제 #8
0
        public ActionResult ParamList(int id = 0)
        {
            CustomReportsViewModel reportModel = new CustomReportsViewModel();

            CustomParamViewModel model = new CustomParamViewModel();

            reportModel.CustomReportID = id;
            reportModel.ParamGridList  = model.GetParamGridList(id);

            return(PartialView("_ParamList", reportModel));
        }
예제 #9
0
        // GET: Admin/CustomReports
        public ActionResult Index()
        {
            // LoginCaptureHelper.InsertCaptureDetails("CustomReports");
            // check to see if the user has logged in. If not get them out of here.
            if (!Security.IsValid("/customreports"))
            {
                return(Redirect("~/"));
            }

            CustomReportsViewModel model = new CustomReportsViewModel();

            model.CustomReportGridList = model.GetCustomReports(0, 10);
            return(View(model));
        }
예제 #10
0
        public ActionResult RunReport(int id)
        {
            var data = (from custom in ContextPerRequest.CurrentData.CustomParams
                        where custom.CustomReportID == id
                        select custom);

            if (data == null)
            {
                // report doesn't have parameters so go run it.
                CustomReportRun(id);
                return(RedirectToAction("CustomReports"));
            }
            else
            {
                CustomReportsViewModel model = new CustomReportsViewModel();

                return(View(model.GetCustomReport(id)));
            }
        }
예제 #11
0
        public ActionResult CustomReportEdit(int id)
        {
            CustomReportsViewModel model = new CustomReportsViewModel();

            return(PartialView("_CustomReportsEdit", model.GetCustomReport(id)));
        }
예제 #12
0
        public ActionResult AddCustomReport(CustomReportsViewModel model)
        {
            model.AddCustomReport(model);

            return(Json(new { success = true }));
        }
예제 #13
0
        public ActionResult CustomReportAdd()
        {
            CustomReportsViewModel model = new CustomReportsViewModel();

            return(PartialView("_CustomReportsAdd", model));
        }