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);
        }
        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;
            
        }