Пример #1
0
 public JsonResult GetOperationSummary(string start, string end)
 {
     try
     {
         if (start == null || end == null)
         {
             return(Json(null, JsonRequestBehavior.AllowGet));
         }
         else
         {
             OperationSummaryParameters param = new OperationSummaryParameters();
             param.Start = start;
             param.End   = end;
             //base.SaveReportParameters(param); //Save parameter to cookie
             using (OperationSummaryService _service = new OperationSummaryService())
             {
                 OperationSummaryModel model = _service.GetOperationSummaryModel(param);
                 return(Json(model, JsonRequestBehavior.AllowGet));
             }
         }
     }
     catch (Exception ex)
     {
         return(Json(ex.Message, JsonRequestBehavior.AllowGet));
     }
 }
Пример #2
0
 public ActionResult OperationSummary()
 {
     using (UIChartService _service = new UIChartService())
     {
         //IQueryParamaters parameter = base.GetReportParameters(Constants.Cookies.OperationSummaryParameters); //get parameter from cookie
         IQueryParamaters parameter = new OperationSummaryParameters();
         return(View(
                    _service.GetUIChartModel(Constants.Pages.SlotOccupation, base.GetCurrentUserId(), base.GetCurrentCulture(), parameter)
                    ));
     }
 }
        public OperationSummaryModel GetOperationSummaryModel(OperationSummaryParameters param)
        {
            DateTime start = DateTime.ParseExact(param.Start, Config.CasinoDateTimeFormat, null);
            DateTime end   = DateTime.ParseExact(param.End, Config.CasinoDateTimeFormat, null);

            OperationSummaryModel model = new OperationSummaryModel();

            model.ProviderList     = this.GetOperationSummaryProviderList(start, end).ToList();
            model.WinSlots         = GetWinSlots();
            model.NetWinCashIn     = GetNetWinCashIn();
            model.NetWinCashOut    = GetNetWinCashOut();
            model.Taxes            = GetTaxes();
            model.PlayerAccountIn  = GetPlayerAccountIn();
            model.PlayerAccountOut = GetPlayerAccountOut();

            model.PlayerAccountAmount = GetPlayerAccountAmount();
            model.SpecialPromos       = GetSpecialPromos();
            model.GrantedPromos       = GetGrantedPromos();
            model.CancelledPromos     = GetCancelledPromos();

            model.ConsumedPromos  = GetConsumedPromos();
            model.OverShortPromos = GetOverShortPromos();

            model.TotalMoneyIn      = GetTotalMoneyIn();
            model.TotalMoneyOut     = GetTotalMoneyOut();
            model.TotalHandPayments = GetTotalHandPayments();
            model.TotalDPromotion   = GetTotalDPromotion();
            model.TotalNetWin       = GetTotalNetWin();
            model.TotalWin          = GetTotalWin();
            model.TotalCantPlayer   = GetTotalCantPlayer();

            model.TotalSessions     = GetTotalSessions();
            model.TotalPlayers      = GetTotalPlayers();
            model.TotalSlots        = GetTotalSlots();
            model.TotalSlotOccupied = GetTotalSlotOccupied();

            model.OSTrendFor1Week = GetOSTrendFor1Week(end).ToList();
            model.OSTrendFor7Week = GetOSTrendFor7Week(end).ToList();
            return(model);
        }
Пример #4
0
        public JsonResult OperationSummaryDataTableHandler(DataTableParameters param, OperationSummaryParameters queryParam)
        {
            try
            {
                using (OperationSummaryService _service = new OperationSummaryService())
                {
                    DateTime start = DateTime.ParseExact(queryParam.Start, Config.CasinoDateTimeFormat, null);
                    DateTime end   = DateTime.ParseExact(queryParam.End, Config.CasinoDateTimeFormat, null);

                    List <OperationSummaryProvider> providerList = _service.GetOperationSummaryProviderList(start, end).ToList();
                    return(Json(new DataTableResult <OperationSummaryProvider>
                                (
                                    param.Draw,
                                    _service.GetSearchResultCount(param, providerList),
                                    _service.GetDataTableResultByPage(param, providerList)
                                ), JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception ex)
            {
                return(Json(new { error = ex.Message }));
            }
        }