public string LoadTransactions(EntranceTableData data)
        {
            if (data.Validation())
            {
                return(string.Format("- validation error -"));
            }

            return(JsonObjectHelper.Json(new StatisticManager().LoadTransactions(data)));
        }
        public ActionResult QuickReport(EntranceTableData data)
        {
            if (data.Validation())
            {
                return(Content(string.Format("<b class=\"message_error\">Internal error. '{0}'</b>", data.ErrorMessage)));
            }

            //StatisticManager manager = new StatisticManager();
            //QuickReportModel model = new QuickReportModel(manager.LoadQuickReports(data));
            return(View("~/Views/Statistic/QuickReport.cshtml", new QuickReportModel(null)));
        }
예제 #3
0
        // SUMMARY: Get .csv from for specific entrance table data
        public FileContentResult Csv(EntranceTableData data)
        {
            if (data.Validation())
            {
                return(null);
            }

            EntranceTableManager entranceTableManager = new EntranceTableManager();

            entranceTableManager.Query(data);
            return(File(new System.Text.UTF8Encoding().GetBytes(entranceTableManager.ConvertToCvs()), "text/csv", "database.csv"));
        }
예제 #4
0
        public ActionResult LoadNewSubsequental(EntranceTableData data)
        {
            if (data.Validation())
            {
                return(Content(string.Format("<b class=\"message_error\">Internal error. '{0}'</b>", data.ErrorMessage)));
            }

            EntranceTableManager entranceTableManager = new EntranceTableManager();
            DataTableModel       model = new DataTableModel(entranceTableManager);

            return(View("~/Views/Database/_DataNewSequential.cshtml", model));
        }
        public ActionResult Cashflow(EntranceTableData data)
        {
            if (data.Validation())
            {
                return(Content(string.Format("<b class=\"message_error\">Internal error. '{0}'</b>", data.ErrorMessage)));
            }

            CashflowLogManager     manager = new CashflowLogManager();
            CashflowStatisticModel model   = new CashflowStatisticModel(manager.Query(data, true));

            return(View("~/Views/Statistic/CashflowReport.cshtml", model));
        }
예제 #6
0
        // SUMMARY: Load entrance table data
        public ActionResult Load(EntranceTableData data)
        {
            if (data.Validation())
            {
                return(Content(string.Format("<b class=\"message_error\">Internal error. '{0}'</b>", data.ErrorMessage)));
            }

            EntranceTableManager entranceTableManager = new EntranceTableManager();

            entranceTableManager.Query(data);

            return(View("~/Views/Database/_Data.cshtml", new DataTableModel(entranceTableManager)));
        }
        public ActionResult Timeline(EntranceTableData data)
        {
            if (data.Validation())
            {
                return(Content(string.Format("<b class=\"message_error\">Internal error. '{0}'</b>", data.ErrorMessage)));
            }

            StatisticManager manager = new StatisticManager();
            TimelineModel    model   = new TimelineModel();

            model.Data = manager.LoadTimeline(data);

            return(View("~/Views/Statistic/Timeline.cshtml", model));
        }
예제 #8
0
        public ActionResult GetData()
        {
            AndroidInputModel inputModel = new AndroidInputModel(this.Request);
            EntranceTableData inputData  = inputModel.ToEntranceTableData();

            if (inputData.Validation())
            {
                return(this.Json(new { status = false }, JsonRequestBehavior.AllowGet));
            }

            EntranceTableManager        entranceTableManager = new EntranceTableManager();
            List <EntranceTableAndroid> result = entranceTableManager.QueryNewAndroid(inputData);

            return(this.Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #9
0
        public ActionResult LoadNew(EntranceTableData data)
        {
            if (data.UseSequentialSearch)
            {
                return(this.LoadNewSubsequental(data));
            }

            if (data.Validation())
            {
                return(Content(string.Format("<b class=\"message_error\">Internal error. '{0}'</b>", data.ErrorMessage)));
            }

            EntranceTableManager entranceTableManager = new EntranceTableManager();

            DataTableModel model = new DataTableModel(entranceTableManager,
                                                      (!data.AndroidClientSession.HasValue ?
                                                       entranceTableManager.QueryNew(data) :
                                                       entranceTableManager.QueryNewAndroidSession(data)));

            return(View(string.Format("~/Views/Database/{0}.cshtml", data.ReturnView), model));
        }