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> 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> 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> 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);
        }
Example #5
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);
        }
        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;
        }
Example #7
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);
        }
        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;
            
        }
        private List <TicketExceptions> LoadExceptions()
        {
            decimal ExceptionTotal = 0;


            List <string> lstPositionstoDisplay = objCashDeskManager.FillListOfFilteredPositions(RouteNumber);
            //FillListOfFilteredPositions
            Tickets oTickets = new Tickets();

            oTickets.EndDate     = dtTo;
            oTickets.StartDate   = dtFrom;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "E";
            oTickets.UserNo      = UserNo;

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

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



            if (lstExceptionsOut != null)
            {
                foreach (TicketExceptions exep in lstExceptionsOut)
                {
                    lstExceptions.Add(exep);
                }
            }

            //CreateTotals cExceptionsTotal
            foreach (TicketExceptions item in lstExceptions)
            {
                ExceptionTotal += (decimal)item.currValue;
            }

            TicketExceptions Total = new TicketExceptions();

            Total.Type   = "Total";
            Total.Amount = CurrencySymbol + "" + Convert.ToDecimal(ExceptionTotal).GetUniversalCurrencyFormat();
            lstExceptions.Insert(0, Total);



            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgExceptions.Value += 50;
            });
            return(lstExceptions);
        }
        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;
        }
Example #13
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);
        }