private List <TicketExceptions> LoadTicketsAll()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            List <string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);


            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate;
            oTickets.StartDate   = StartDate;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "A";
            oTickets.UserNo      = UserNo;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgDebugState.Value += 50;
            });
            List <TicketExceptions> lstExceptions = objCashDeskManager.TitoTicketsAll(oTickets, lstPositionstoDisplay);

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgDebugState.Value += 150;
            });
            return(lstExceptions);
        }
        private List <TicketExceptions> LoadTicketAnomalies()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvTicketAnomalies.Items.Clear();
            });

            List <string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo   = EndDate;
            oTicketsClaimed.UserNo             = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgTicketAnomalies.Value += 75;
            });


            List <TicketExceptions> lstTicketAnomalies = objCashDeskManager.GetTicketAnomalies(oTicketsClaimed, lstPositionstoDisplay);

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgTicketAnomalies.Value += 50;
            });
            return(lstTicketAnomalies);
        }
        public CExceptions(string RouteNumber, DateTime From, DateTime To, Grid pnlContent)
        {
            InitializeComponent();
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            _worker = new BackgroundWorker();
            _worker.WorkerReportsProgress = true;
            _worker.WorkerSupportsCancellation = true;
            this.RouteNumber = RouteNumber;
            this.dtFrom = From;
            this.dtTo = To;
            this.pnlContent = pnlContent;

            // For resizing columns automatically.
            GridView gv = lvExceptions.View as GridView;
            if (gv != null)
            {
                foreach (GridViewColumn gvc in gv.Columns)
                {
                    gvc.Width = gvc.ActualWidth;
                    if (gvc.Width == 0.0 || gvc.Width == 0)
                        gvc.Width = 0;
                    else
                        gvc.Width = Double.NaN;
                }
            }        
        }
        public CExceptions(string RouteNumber, DateTime From, DateTime To, Grid pnlContent)
        {
            InitializeComponent();
            objCashDeskManager                 = CashDeskManagerBusinessObject.CreateInstance();
            _worker                            = new BackgroundWorker();
            _worker.WorkerReportsProgress      = true;
            _worker.WorkerSupportsCancellation = true;
            this.RouteNumber                   = RouteNumber;
            this.dtFrom                        = From;
            this.dtTo                          = To;
            this.pnlContent                    = pnlContent;

            // For resizing columns automatically.
            GridView gv = lvExceptions.View as GridView;

            if (gv != null)
            {
                foreach (GridViewColumn gvc in gv.Columns)
                {
                    gvc.Width = gvc.ActualWidth;
                    if (gvc.Width == 0.0 || gvc.Width == 0)
                    {
                        gvc.Width = 0;
                    }
                    else
                    {
                        gvc.Width = Double.NaN;
                    }
                }
            }
        }
Beispiel #5
0
        public CashDeskManagerAllDetails(List <rsp_CDM_GetCashierTransactionsDetails_New> lstTickets, DateTime startDate, DateTime endDate, string FooterText, int userNo, int RouteNo)
        {
            try
            {
                InitializeComponent();

                lstCashierTransactionsDetails = lstTickets.ToList();
                dtTickets = lstTickets.ToDataSet <rsp_CDM_GetCashierTransactionsDetails_New>("DetailsView");

                if (!Security.SecurityHelper.HasAccess("BMC.Presentation.CashDeskManager.UserControls.CashDeskManagerAllDetails.lvViewAll.TicketValue"))
                {
                    lstTickets.ForEach((x) => { if (x.Ticket.Trim().Length > 8)
                                                {
                                                    x.Ticket = x.Ticket.Trim().Remove(x.Ticket.Trim().Length - 4, 4) + "****";
                                                }
                                       });
                }

                this.DataContext = lstTickets;
                this.StartDate   = startDate;
                this.EndDate     = endDate;
                this.sFooterText = FooterText;

                this.user      = userNo;
                this.iRoute_No = RouteNo;

                objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
        private  List<TicketExceptions> LoadTicketsAll()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            List<string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);


            Tickets oTickets = new Tickets();
            oTickets.EndDate = EndDate;
            oTickets.StartDate = StartDate;
            oTickets.IsLiability = false;
            oTickets.BarCode = "%";
            oTickets.Type = "A";
            oTickets.UserNo = UserNo;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
             {
                 prgDebugState.Value += 50;
             });
            List<TicketExceptions> lstExceptions = objCashDeskManager.TitoTicketsAll(oTickets, lstPositionstoDisplay);

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgDebugState.Value += 150;
            });
            return lstExceptions;
        }
 public cHourly()
 {
     InitializeComponent();
     objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
     try
     {
         StartHour = BMC.Transport.Settings.Gaming_Day_Start_Hour;
     }
     catch
     { }
     btnSummary.Visibility = Visibility.Hidden;
 }
        private List <TicketExceptions> LoadVoidExpiredTickets()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvVoidExpired.Items.Clear();
            });

            List <string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate;
            oTickets.StartDate   = StartDate;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "D";
            oTickets.UserNo      = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgVoidExpiredState.Value += 75;
            });

            List <TicketExceptions> lstVoidExpired = objCashDeskManager.GetTicket_VoidnExpired(oTickets, lstPositionstoDisplay);


            decimal          ExceptionTotal = 0;
            TicketExceptions Total          = new TicketExceptions();

            Total.PrintDate = "Total";

            if (lstVoidExpired != null)
            {
                foreach (TicketExceptions exep in lstVoidExpired)
                {
                    ExceptionTotal += (decimal)exep.Value;
                }

                Total.Value  = (double)Decimal.Round(ExceptionTotal, 2);
                Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
                lstVoidExpired.Insert(0, Total);
                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
                {
                    prgVoidExpiredState.Value += 50;
                });
            }

            return(lstVoidExpired);
        }
 public CCashDeskManager()
 {
     try
     {
         InitializeComponent();
         objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
         _worker = new BackgroundWorker();
         _worker.WorkerReportsProgress = true;
         _worker.WorkerSupportsCancellation = true;
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
Beispiel #10
0
        private List <TicketExceptions> LoadPromoTickets()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvPromoCashable.Items.Clear();
            });

            List <string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo   = EndDate;
            oTicketsClaimed.UserNo             = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgPromo.Value += 50;
            });


            List <TicketExceptions> lstPromoTickets = objCashDeskManager.GetPromoCashableTickets(oTicketsClaimed, lstPositionstoDisplay);

            decimal          ExceptionTotal = 0;
            TicketExceptions Total          = new TicketExceptions();

            Total.PrintDate = "Total";
            if (lstPromoTickets != null)
            {
                foreach (TicketExceptions exep in lstPromoTickets)
                {
                    ExceptionTotal += (decimal)exep.Value;
                }
                Total.Value  = (double)Decimal.Round(ExceptionTotal, 2);
                Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
                lstPromoTickets.Insert(0, Total);
                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
                {
                    prgPromo.Value += 50;
                });
            }
            return(lstPromoTickets);
        }
Beispiel #11
0
        public CashDeskManagerAllDetails(ISingleResult <rsp_CDM_GetCashierTransactionsDetails_New> lstTickets, DateTime startDate, DateTime endDate, string FooterText,
                                         bool?chkCashDeskTicketIn, bool?chkCashDeskTicketOut, bool?chkHandpays, bool?chkShortPays, bool?chkVoidVouchers, bool?chkjackpot, bool?chkProghandpays, bool?chkVoidTransactions,
                                         bool?chkTicketIn, bool?chkTicketOut, bool?chkActive, bool?chkVoidCancel, bool?chkExpired, bool?chkException,
                                         bool?chkLiability, bool?chkPromo, bool?chkNCTicketIn, bool?chkNCTicketOut, int userNo, int RouteNo)
        {
            try
            {
                InitializeComponent();


                lstCashierTransactionsDetails = lstTickets.ToList();
                this.DataContext = lstCashierTransactionsDetails;
                this.StartDate   = startDate;
                this.EndDate     = endDate;
                this.sFooterText = FooterText;

                this.chkCashDeskTicketIn  = chkCashDeskTicketIn;
                this.chkCashDeskTicketOut = chkCashDeskTicketOut;
                this.chkHandpays          = chkHandpays;
                this.chkShortPays         = chkShortPays;
                this.chkVoidVouchers      = chkVoidVouchers;
                this.chkjackpot           = chkjackpot;
                this.chkProghandpays      = chkProghandpays;
                this.chkVoidTransactions  = chkVoidTransactions;
                this.chkTicketIn          = chkTicketIn;
                this.chkTicketOut         = chkTicketOut;
                this.chkActive            = chkActive;
                this.chkVoidCancel        = chkVoidCancel;
                this.chkExpired           = chkExpired;
                this.chkException         = chkException;
                this.chkLiability         = chkLiability;
                this.chkPromo             = chkPromo;
                this.chkNCTicketIn        = chkNCTicketIn;
                this.chkNCTicketOut       = chkNCTicketOut;
                this.user      = userNo;
                this.iRoute_No = RouteNo;

                objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
Beispiel #12
0
 public CashDeskManagerAllDetails()
 {
     InitializeComponent();
     objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
 }
        private List<TicketExceptions> LoadLiabilities()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
             {
                 lvLiability.Items.Clear();
             });
            List<string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);


            TicketsClaimed oTicketsClaimed = new TicketsClaimed();
            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo = EndDate;

            Tickets oTickets = new Tickets();
            oTickets.EndDate = EndDate;
            oTickets.StartDate = StartDate;
            oTickets.IsLiability = true;
            oTickets.BarCode = "%";
            oTickets.Type = "C";
            oTickets.UserNo = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgLiability.Value += 50;
            });
            List<TicketExceptions> lstTitoTicketsClaimed = objCashDeskManager.TitoTicketsClaimedLiability(oTickets, lstPositionstoDisplay);
            if (lstTitoTicketsClaimed == null)
            {
                lstTitoTicketsClaimed = new List<TicketExceptions>();
            }

            oTickets.Type = "P";

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgLiability.Value += 50;
            });
            List<TicketExceptions> lstTitoTicketsPrinted = objCashDeskManager.TitoTicketsPrintedLiability(oTickets, lstPositionstoDisplay);
            //lvLiability.ItemsSource = lstTitoTicketsPrinted;

            if (lstTitoTicketsPrinted != null)
            {
                foreach (TicketExceptions item in lstTitoTicketsPrinted)
                {
                    if (item.VoucherStatus.ToUpper().Trim() != "PP")
                    {
                        lstTitoTicketsClaimed.Add(item);
                    }
                }
            }
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgLiability.Value += 50;
            });
            List<TicketExceptions> lstTicketsClaimed = objCashDeskManager.TicketsClaimed(oTicketsClaimed, lstPositionstoDisplay);
            if (lstTicketsClaimed != null)
            {
                foreach (TicketExceptions item in lstTicketsClaimed)
                {
                    if (item.VoucherStatus.ToUpper().Trim() != "PP")
                    {
                        lstTitoTicketsClaimed.Add(item);
                    }
                }
                //lvLiability.ItemsSource = lstTicketsClaimed;
            }
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgLiability.Value += 50;
            });
            List<TicketExceptions> lstTicketsPrinted = objCashDeskManager.TicketsPrinted(oTicketsClaimed, lstPositionstoDisplay);
            if (lstTicketsPrinted != null)
            {
                foreach (TicketExceptions item in lstTicketsPrinted)
                {
                    lstTitoTicketsClaimed.Add(item);
                }
                // lvLiability.ItemsSource = lstTicketsPrinted;
            }


            decimal ExceptionTotal = 0;
            TicketExceptions Total = new TicketExceptions();
            Total.PrintDate = "Total";
            foreach (TicketExceptions exep in lstTitoTicketsClaimed)
            {
                if (exep.VoucherStatus.ToUpper().Trim() != "PP")
                {
                    ExceptionTotal += (decimal)exep.Value;
                }
            }
            Total.Value = Convert.ToDouble(ExceptionTotal);
            Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
             //Total.Amount = ExceptionTotal.ToString();
            lstTitoTicketsClaimed.Insert(0, Total);
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgLiability.Value += 50;
            });

            return lstTitoTicketsClaimed;
        }
        private List<TicketExceptions> LoadTicketAnomalies()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
              {
                  lvTicketAnomalies.Items.Clear();
              });

            List<string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();
            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo = EndDate;
            oTicketsClaimed.UserNo = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgTicketAnomalies.Value += 75;
            });


            List<TicketExceptions> lstTicketAnomalies = objCashDeskManager.GetTicketAnomalies(oTicketsClaimed, lstPositionstoDisplay);
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgTicketAnomalies.Value += 50;
            });
            return lstTicketAnomalies;
        }
        private List<TicketExceptions> LoadActiveTickets()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
               {
                   lvActiveTickets.Items.Clear();
               });

            List<string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();
            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo = EndDate;

            Tickets oTickets = new Tickets();
            oTickets.EndDate = EndDate;
            oTickets.StartDate = StartDate;
            oTickets.IsLiability = false;
            oTickets.BarCode = "%";
            oTickets.Type = "U";
            oTickets.UserNo = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgActiveTickets.Value += 50;
            });
            List<TicketExceptions> lstTitoTicketsUnclaimed = objCashDeskManager.TitoTicketsUnclaimed(oTickets, lstPositionstoDisplay);
            if (lstTitoTicketsUnclaimed == null)
            {
                lstTitoTicketsUnclaimed = new List<TicketExceptions>();
            }

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgActiveTickets.Value += 50;
            });
            List<TicketExceptions> lstTicketsUnClaimed = objCashDeskManager.TicketsUnclaimed(oTicketsClaimed, lstPositionstoDisplay);

            if (lstTicketsUnClaimed != null)
            {
                foreach (TicketExceptions item in lstTicketsUnClaimed)
                {
                    lstTitoTicketsUnclaimed.Add(item);
                }
            }
            decimal ExceptionTotal = 0;
            TicketExceptions Total = new TicketExceptions();
            Total.PrintDate = string.Empty;
            Total.PrintDate = "Total";
            Total.PayDate = string.Empty;
            foreach (TicketExceptions exep in lstTitoTicketsUnclaimed)
            {
                ExceptionTotal += (decimal)exep.Value;
            }
            Total.Value = (double)Decimal.Round(ExceptionTotal, 2);
            Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
            lstTitoTicketsUnclaimed.Insert(0, Total);
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgActiveTickets.Value += 50;
            });

            return lstTitoTicketsUnclaimed;
        }
        private List<TicketExceptions> LoadVoidCancelledTickets()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
               {
                   lvVoidCancelled.Items.Clear();
               });
            List<string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            Tickets oTickets = new Tickets();
            oTickets.EndDate = EndDate;
            oTickets.StartDate = StartDate;
            oTickets.IsLiability = false;
            oTickets.BarCode = "%";
            oTickets.Type = "B";
            oTickets.UserNo = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgVoidcancelled.Value += 50;
            });

            List<TicketExceptions> lstVoidCancelled = objCashDeskManager.GetTicket_VoidnExpired(oTickets, lstPositionstoDisplay);

            if (lstVoidCancelled != null)
            {
                decimal ExceptionTotal = 0;
                TicketExceptions Total = new TicketExceptions();
                Total.PrintDate = "Total";
                foreach (TicketExceptions exep in lstVoidCancelled)
                {
                    ExceptionTotal += (decimal)exep.Value;
                }
                Total.Value = (double)Decimal.Round(ExceptionTotal, 2);
               // Total.Amount = Total.Value.ToString("###0.#0");
                Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
                lstVoidCancelled.Insert(0, Total);

                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
                {
                    prgVoidcancelled.Value += 50;
                });
            }

            return lstVoidCancelled;
            
        }
        public CashDeskManagerAllDetails(List<rsp_CDM_GetCashierTransactionsDetails_New> lstTickets, DateTime startDate, DateTime endDate, string FooterText, int userNo, int RouteNo)
        {
            try
            {

                InitializeComponent();

                lstCashierTransactionsDetails = lstTickets.ToList();
                dtTickets = lstTickets.ToDataSet<rsp_CDM_GetCashierTransactionsDetails_New>("DetailsView");

                if (!Security.SecurityHelper.HasAccess("BMC.Presentation.CashDeskManager.UserControls.CashDeskManagerAllDetails.lvViewAll.TicketValue"))
                {

                    lstTickets.ForEach((x) => { if (x.Ticket.Trim().Length > 8) x.Ticket = x.Ticket.Trim().Remove(x.Ticket.Trim().Length - 4, 4) + "****"; });

                }

                this.DataContext = lstTickets;
                this.StartDate = startDate;
                this.EndDate = endDate;
                this.sFooterText = FooterText;

                this.user = userNo;
                this.iRoute_No = RouteNo;

                objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
        public CCashDeskManager(Grid pnlContent)
        {
            try
            {
                InitializeComponent();
                objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
                _worker = new BackgroundWorker();
                _worker.WorkerReportsProgress = true;
                _worker.WorkerSupportsCancellation = true;
                UserRoles = objCashDeskManager.GetListOfUsersRoles(SecurityHelper.CurrentUser.User_No);
                URoleBased = UserRoles.Where(RoleName => RoleName.RoleAccessName == UserRole.AccessOtherUsers.ToString()).ToList();

                Thread.Sleep(5);
                List<User> users;
                if (URoleBased.Count == 0)
                    users = objCashDeskManager.GetListOfUsers(SecurityHelper.CurrentUser.User_No);
                else
                {
                    users = objCashDeskManager.GetListOfUsers(0);
                    users.Insert(0, new User()
                    {
                        UserNo = 0,
                        UserName = "******",
                        RoleAccessName = string.Empty,
                        RoleaccessID = 0,
                        RoleName = string.Empty,
                        SecurityUserID = 0
                    });

                }

                if (users.Count > 0)
                    UserNo = (users[0] as User).UserNo;

                cboUser.ItemsSource = users.Distinct();
                cboUser.DisplayMemberPath = "UserName";
                cboUser.SelectedIndex = 0;

                cboUser.SelectionChanged += new SelectionChangedEventHandler(cboUser_SelectionChanged);
                LoadRoute();

                this.pnlContent = pnlContent;
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
Beispiel #19
0
        private List <TicketExceptions> LoadLiabilities()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvLiability.Items.Clear();
            });
            List <string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);


            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo   = EndDate;

            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate;
            oTickets.StartDate   = StartDate;
            oTickets.IsLiability = true;
            oTickets.BarCode     = "%";
            oTickets.Type        = "C";
            oTickets.UserNo      = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgLiability.Value += 50;
            });
            List <TicketExceptions> lstTitoTicketsClaimed = objCashDeskManager.TitoTicketsClaimedLiability(oTickets, lstPositionstoDisplay);

            if (lstTitoTicketsClaimed == null)
            {
                lstTitoTicketsClaimed = new List <TicketExceptions>();
            }

            oTickets.Type = "P";

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgLiability.Value += 50;
            });
            List <TicketExceptions> lstTitoTicketsPrinted = objCashDeskManager.TitoTicketsPrintedLiability(oTickets, lstPositionstoDisplay);

            //lvLiability.ItemsSource = lstTitoTicketsPrinted;

            if (lstTitoTicketsPrinted != null)
            {
                foreach (TicketExceptions item in lstTitoTicketsPrinted)
                {
                    if (item.VoucherStatus.ToUpper().Trim() != "PP")
                    {
                        lstTitoTicketsClaimed.Add(item);
                    }
                }
            }
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgLiability.Value += 50;
            });
            List <TicketExceptions> lstTicketsClaimed = objCashDeskManager.TicketsClaimed(oTicketsClaimed, lstPositionstoDisplay);

            if (lstTicketsClaimed != null)
            {
                foreach (TicketExceptions item in lstTicketsClaimed)
                {
                    if (item.VoucherStatus.ToUpper().Trim() != "PP")
                    {
                        lstTitoTicketsClaimed.Add(item);
                    }
                }
                //lvLiability.ItemsSource = lstTicketsClaimed;
            }
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgLiability.Value += 50;
            });
            List <TicketExceptions> lstTicketsPrinted = objCashDeskManager.TicketsPrinted(oTicketsClaimed, lstPositionstoDisplay);

            if (lstTicketsPrinted != null)
            {
                foreach (TicketExceptions item in lstTicketsPrinted)
                {
                    lstTitoTicketsClaimed.Add(item);
                }
                // lvLiability.ItemsSource = lstTicketsPrinted;
            }


            decimal          ExceptionTotal = 0;
            TicketExceptions Total          = new TicketExceptions();

            Total.PrintDate = "Total";
            foreach (TicketExceptions exep in lstTitoTicketsClaimed)
            {
                if (exep.VoucherStatus.ToUpper().Trim() != "PP")
                {
                    ExceptionTotal += (decimal)exep.Value;
                }
            }
            Total.Value  = Convert.ToDouble(ExceptionTotal);
            Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
            //Total.Amount = ExceptionTotal.ToString();
            lstTitoTicketsClaimed.Insert(0, Total);
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgLiability.Value += 50;
            });

            return(lstTitoTicketsClaimed);
        }
        public CashDeskManagerAllDetails(ISingleResult<rsp_CDM_GetCashierTransactionsDetails_New> lstTickets, DateTime startDate, DateTime endDate, string FooterText,
            bool? chkCashDeskTicketIn, bool? chkCashDeskTicketOut, bool? chkHandpays, bool? chkShortPays, bool? chkVoidVouchers, bool? chkjackpot, bool? chkProghandpays, bool? chkVoidTransactions,
            bool? chkTicketIn, bool? chkTicketOut, bool? chkActive, bool? chkVoidCancel, bool? chkExpired, bool? chkException,
            bool? chkLiability, bool? chkPromo, bool? chkNCTicketIn, bool? chkNCTicketOut, int userNo, int RouteNo)
        {
            try
            {

                InitializeComponent();


                lstCashierTransactionsDetails = lstTickets.ToList();
                this.DataContext = lstCashierTransactionsDetails;
                this.StartDate = startDate;
                this.EndDate = endDate;
                this.sFooterText = FooterText;

                this.chkCashDeskTicketIn = chkCashDeskTicketIn;
                this.chkCashDeskTicketOut = chkCashDeskTicketOut;
                this.chkHandpays = chkHandpays;
                this.chkShortPays = chkShortPays;
                this.chkVoidVouchers = chkVoidVouchers;
                this.chkjackpot = chkjackpot;
                this.chkProghandpays = chkProghandpays;
                this.chkVoidTransactions = chkVoidTransactions;
                this.chkTicketIn = chkTicketIn;
                this.chkTicketOut = chkTicketOut;
                this.chkActive = chkActive;
                this.chkVoidCancel = chkVoidCancel;
                this.chkExpired = chkExpired;
                this.chkException = chkException;
                this.chkLiability = chkLiability;
                this.chkPromo = chkPromo;
                this.chkNCTicketIn = chkNCTicketIn;
                this.chkNCTicketOut = chkNCTicketOut;
                this.user = userNo;
                this.iRoute_No = RouteNo;

                objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
 public CashDeskManagerAllDetails()
 {
     InitializeComponent();
     objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
 }
        private List<TicketExceptions> LoadPromoTickets()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
               {
                   lvPromoCashable.Items.Clear();
               });

            List<string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();
            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo = EndDate;
            oTicketsClaimed.UserNo = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
            {
                prgPromo.Value += 50;
            });


            List<TicketExceptions> lstPromoTickets = objCashDeskManager.GetPromoCashableTickets(oTicketsClaimed, lstPositionstoDisplay);

            decimal ExceptionTotal = 0;
            TicketExceptions Total = new TicketExceptions();
            Total.PrintDate = "Total";
            if (lstPromoTickets != null)
            {
                foreach (TicketExceptions exep in lstPromoTickets)
                {
                    ExceptionTotal += (decimal)exep.Value;
                }
                Total.Value = (double)Decimal.Round(ExceptionTotal, 2);
                Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
                lstPromoTickets.Insert(0, Total);
                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate
                {
                    prgPromo.Value += 50;
                });
            }
            return lstPromoTickets;
        }
Beispiel #23
0
        private List <TicketExceptions> LoadActiveTickets()
        {
            objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvActiveTickets.Items.Clear();
            });

            List <string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate;
            oTicketsClaimed.TicketsClaimedTo   = EndDate;

            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate;
            oTickets.StartDate   = StartDate;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "U";
            oTickets.UserNo      = UserNo;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgActiveTickets.Value += 50;
            });
            List <TicketExceptions> lstTitoTicketsUnclaimed = objCashDeskManager.TitoTicketsUnclaimed(oTickets, lstPositionstoDisplay);

            if (lstTitoTicketsUnclaimed == null)
            {
                lstTitoTicketsUnclaimed = new List <TicketExceptions>();
            }

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgActiveTickets.Value += 50;
            });
            List <TicketExceptions> lstTicketsUnClaimed = objCashDeskManager.TicketsUnclaimed(oTicketsClaimed, lstPositionstoDisplay);

            if (lstTicketsUnClaimed != null)
            {
                foreach (TicketExceptions item in lstTicketsUnClaimed)
                {
                    lstTitoTicketsUnclaimed.Add(item);
                }
            }
            decimal          ExceptionTotal = 0;
            TicketExceptions Total          = new TicketExceptions();

            Total.PrintDate = string.Empty;
            Total.PrintDate = "Total";
            Total.PayDate   = string.Empty;
            foreach (TicketExceptions exep in lstTitoTicketsUnclaimed)
            {
                ExceptionTotal += (decimal)exep.Value;
            }
            Total.Value  = (double)Decimal.Round(ExceptionTotal, 2);
            Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
            lstTitoTicketsUnclaimed.Insert(0, Total);
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgActiveTickets.Value += 50;
            });

            return(lstTitoTicketsUnclaimed);
        }