Exemplo n.º 1
0
        private List <TicketExceptions> LoadTicketsAll()
        {
            busTreasury = new TreasuryTransactions();

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


            Tickets oTickets = new Tickets();

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

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgDebugState.Value += 150;
            });
            return(lstExceptions);
        }
Exemplo n.º 2
0
        private List <TicketExceptions> LoadTicketAnomalies()
        {
            busTreasury = new TreasuryTransactions();
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvTicketAnomalies.Items.Clear();
            });

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

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate + " " + StartTime;
            oTicketsClaimed.TicketsClaimedTo   = EndDate + " " + EndTime;

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


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

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgTicketAnomalies.Value += 50;
            });
            return(lstTicketAnomalies);
        }
Exemplo n.º 3
0
 private void btnMovement_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(StartDate) || string.IsNullOrEmpty(EndDate))
     {
         BMC.Presentation.CashDeskManager.MessageBox.showBox("Not a valid Date Range");
         return;
     }
     if (File.Exists(System.Windows.Forms.Application.StartupPath + "\\CashdeskReports.exe"))
     {
         Process proc = new System.Diagnostics.Process();
         proc.EnableRaisingEvents = false;
         proc.StartInfo.FileName  = "CashdeskReports.exe";
         busTreasury = new TreasuryTransactions();
         if (busTreasury.GetRegionFromSite().Equals("US"))
         {
             proc.StartInfo.Arguments = "/TYPE=CDRESULTUS /STARTDATE=" + StartDate + " " + StartTime + " /ENDDATE=" + EndDate + " " + EndTime;
         }
         else if (busTreasury.GetRegionFromSite().Equals("UK"))
         {
             proc.StartInfo.Arguments = "/TYPE=CDRESULT /STARTDATE=" + StartDate + " " + StartTime + " /ENDDATE=" + EndDate + " " + EndTime;
         }
         proc.Start();
     }
     else
     {
         BMC.Presentation.CashDeskManager.MessageBox.showBox("Missing cashdeskreport module");
     }
 }
        private List <TicketExceptions> LoadExceptions()
        {
            busTreasury = new TreasuryTransactions();
            float ExceptionTotal = 0F;

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvExceptions.Items.Clear();
            });
            List <string> lstPositionstoDisplay = busTreasury.FillListOfFilteredPositions(RouteNumber);
            //FillListOfFilteredPositions
            Tickets oTickets = new Tickets();

            oTickets.EndDate     = dtTo + " " + TimeTo;
            oTickets.StartDate   = dtFrom + " " + TimeFrom;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "E";
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgExceptions.Value += 50;
            });
            List <TicketExceptions> lstExceptions = busTreasury.TITOTicketInExceptions(oTickets, lstPositionstoDisplay);

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

            if (lstExceptionsOut.Count > 0)
            {
                if (lstExceptionsOut[0].bExceptionRecordFound)
                {
                    TicketExceptions Total = new TicketExceptions();
                    Total.Type = "Total";
                    foreach (TicketExceptions exep in lstExceptionsOut)
                    {
                        ExceptionTotal += exep.cExceptionsTotal;
                    }
                    Total.Value = Convert.ToDouble(ExceptionTotal.ToString("###0.00"));
                    lstExceptionsOut.Insert(0, Total);

                    //CreateTotals cExceptionsTotal
                }
            }
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgExceptions.Value += 50;
            });
            return(lstExceptionsOut);
        }
Exemplo n.º 5
0
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     wfDatePickerTo.Value   = DateTime.Now;
     wfDatePickerFrom.Value = DateTime.Now.AddDays(-1);
     busTreasury            = new TreasuryTransactions();
     System.Windows.Controls.ListViewItem item = null;
     foreach (KeyValuePair <string, string> KeyValue in busTreasury.FillRouteFilter())
     {
         item         = new System.Windows.Controls.ListViewItem();
         item.Content = KeyValue.Value;
         item.Tag     = KeyValue.Key;
         cmbRouteFilter.Items.Add(item);
     }
     cmbRouteFilter.SelectedIndex = 0;
 }
Exemplo n.º 6
0
        private List <TicketExceptions> LoadVoidExpiredTickets()
        {
            busTreasury = new TreasuryTransactions();
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvVoidExpired.Items.Clear();
            });

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

            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate + " " + EndTime;
            oTickets.StartDate   = StartDate + " " + StartTime;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "D";
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgVoidExpiredState.Value += 75;
            });

            List <TicketExceptions> lstVoidExpired = busTreasury.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);
                lstVoidExpired.Insert(0, Total);
                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
                {
                    prgVoidExpiredState.Value += 50;
                });
            }

            return(lstVoidExpired);
        }
Exemplo n.º 7
0
        private List <TicketExceptions> LoadPromoTickets()
        {
            busTreasury = new TreasuryTransactions();
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvPromoCashable.Items.Clear();
            });

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

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate + " " + StartTime;
            oTicketsClaimed.TicketsClaimedTo   = EndDate + " " + EndTime;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgPromo.Value += 50;
            });


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

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

            Total.PrintDate = "Total";
            foreach (TicketExceptions exep in lstPromoTickets)
            {
                ExceptionTotal += (decimal)exep.Value;
            }
            Total.Value = (double)Decimal.Round(ExceptionTotal, 2);
            lstPromoTickets.Insert(0, Total);
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgPromo.Value += 50;
            });

            return(lstPromoTickets);
        }
Exemplo n.º 8
0
        private List <TicketExceptions> LoadCashDeskDetails()
        {
            string szErrDesc = string.Empty;
            double cTicketClaimedTotalCashdesk = 0, cTicketPrintedTotalCashdesk = 0, cTicketPrintedTotalEGM = 0,
                   cTicketClaimedTotalEGM = 0, cTicketsUnclaimed = 0, cTicketInExceptions = 0, cTicketOutExceptions = 0;
            double currEGM = 0, currCashdesk = 0, cTicketsVoid = 0, cTicketsExpired = 0, cTicketCancelled = 0;

            double cRefundTotal = 0, cRefillTotal = 0, cShortpayTotal = 0, cHandPayTotal = 0, cCashDeskFloatTotal = 0,
                   cProgressiveTotal = 0, cJackpotTotal = 0;

            double RefillQty = 0, RefundQty = 0, ShortpayQty = 0, HandpayQty = 0, CashDeskFloatQty = 0,
                   ProgressiveQty = 0, JackpotQty = 0, CashDeskClaimedQty = 0, MachineClaimedQty = 0, CashDeskPrintedQty = 0, MachinePrintedQty = 0;


            busTreasury = new TreasuryTransactions();
            RouteNumber = "0";


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

            if (string.IsNullOrEmpty(StartDate) || string.IsNullOrEmpty(EndDate))
            {
                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
                {
                    BMC.Presentation.CashDeskManager.MessageBox.showBox("Not a valid Date Range");
                    //prgViewAll.Value = 0;
                });
                return(null);
            }

            if (!Business.CashDeskManager.Common.isValidDateRange((StartDate + " " + StartTime), (EndDate + " " + EndTime)))
            {
                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
                {
                    BMC.Presentation.CashDeskManager.MessageBox.showBox("Not a valid Date Range");
                    // prgViewAll.Value = 0;
                });
                return(null);
            }

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedTo   = EndDate + " " + EndTime;
            oTicketsClaimed.TicketsClaimedFrom = StartDate + " " + StartTime;

            szErrDesc = "pre tickets claimed";
            List <TicketExceptions> lstTicketsClaimed = busTreasury.TicketsClaimed(oTicketsClaimed, lstPositionstoDisplay);

            if (lstTicketsClaimed != null)
            {
                foreach (TicketExceptions exep in lstTicketsClaimed)
                {
                    cTicketClaimedTotalCashdesk += (float)exep.Value;
                }
            }
            else
            {
                lstTicketsClaimed = new List <TicketExceptions>();
            }


            szErrDesc = "pre tickets printed";
            List <TicketExceptions> lstTicketsPrinted = busTreasury.TicketsPrinted(oTicketsClaimed, lstPositionstoDisplay);

            if (lstTicketsPrinted != null)
            {
                foreach (TicketExceptions exep in lstTicketsPrinted)
                {
                    cTicketPrintedTotalEGM += (float)exep.Value;
                }
                foreach (TicketExceptions item in lstTicketsPrinted)
                {
                    lstTicketsClaimed.Add(item);
                }
            }


            szErrDesc = "pre TiTo claimed";

            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate + " " + EndTime;
            oTickets.StartDate   = StartDate + " " + StartTime;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "C";
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsClaimedInCashDesk = (bool)chkCashDeskTicketIn.IsChecked;
                oTickets.IsClaimedInMachine  = (bool)chkTicketIn.IsChecked;
                prgViewAll.Value            += 20;
            }

                                                                 );


            List <TicketExceptions> lstTitoClaimed = busTreasury.TitoTicketsClaimed(oTickets, lstPositionstoDisplay);

            if (lstTitoClaimed != null)
            {
                foreach (TicketExceptions exep in lstTitoClaimed)
                {
                    currEGM            += exep.currEGM;
                    currCashdesk       += exep.CurrentCashDesk;
                    CashDeskClaimedQty += exep.CashDeskClaimedQty;
                    MachineClaimedQty  += exep.MachineClaimedQty;
                }
                System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
                {
                    if ((bool)chkCashDeskTicketIn.IsChecked && (bool)chkTicketIn.IsChecked)
                    {
                        foreach (TicketExceptions item in lstTitoClaimed)
                        {
                            lstTicketsClaimed.Add(item);
                        }
                    }
                    prgViewAll.Value += 20;
                });
                cTicketClaimedTotalCashdesk = cTicketClaimedTotalCashdesk + currCashdesk;
                cTicketClaimedTotalEGM      = cTicketClaimedTotalEGM + currEGM;
            }


            oTickets.Type = "U";
            List <TicketExceptions> lstTicketsUnclaimed = busTreasury.TitoTicketsUnclaimed(oTickets, lstPositionstoDisplay);

            if (lstTicketsUnclaimed != null)
            {
                foreach (TicketExceptions exep in lstTicketsUnclaimed)
                {
                    cTicketsUnclaimed += (float)exep.Value;
                    lstTicketsClaimed.Add(exep);
                }
            }

            oTickets.Type = "E";
            List <TicketExceptions> lstTicketInExceptions = busTreasury.TITOTicketInExceptions(oTickets, lstPositionstoDisplay);

            if (lstTicketInExceptions != null)
            {
                foreach (TicketExceptions exep in lstTicketInExceptions)
                {
                    cTicketInExceptions += (double)exep.currValue;
                    lstTicketsClaimed.Add(exep);
                }
            }

            oTickets.Type = "E";
            List <TicketExceptions> lstTicketOutExceptions = busTreasury.TitoTicketOutExceptions(oTickets, lstPositionstoDisplay);

            if (lstTicketOutExceptions != null)
            {
                foreach (TicketExceptions exep in lstTicketOutExceptions)
                {
                    cTicketOutExceptions += (float)exep.cTicketTotal;
                    // lstTicketsClaimed.Add(exep);
                }
            }

            //cTicketOutExceptions = lstTicketOutExceptions[0].cTicketTotal;

            oTickets.Type = "V";
            List <TicketExceptions> lstTicketsVoid = busTreasury.GetTicket_VoidnExpired(oTickets, lstPositionstoDisplay);

            if (lstTicketsVoid != null)
            {
                foreach (TicketExceptions exep in lstTicketsVoid)
                {
                    lstTicketsClaimed.Add(exep);
                    cTicketsVoid += (float)exep.cTicketTotal;
                }
            }
            //cTicketsVoid = lstTicketsVoid[0].cTicketTotal;

            oTickets.Type = "D";
            List <TicketExceptions> lstTicketsExpired = busTreasury.GetTicket_VoidnExpired(oTickets, lstPositionstoDisplay);

            if (lstTicketsExpired != null)
            {
                foreach (TicketExceptions exep in lstTicketsExpired)
                {
                    lstTicketsClaimed.Add(exep);
                    cTicketsExpired += (float)exep.currValue;
                }
            }


            oTickets.Type = "B";
            List <TicketExceptions> lstTicketsCancelled = busTreasury.GetTicket_VoidnExpired(oTickets, lstPositionstoDisplay);

            if (lstTicketsCancelled != null)
            {
                foreach (TicketExceptions exep in lstTicketsCancelled)
                {
                    lstTicketsClaimed.Add(exep);
                    cTicketCancelled += (float)exep.cTicketTotal;
                }
            }



            oTickets.Type = "P";
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsPrintedInCashDesk = (bool)chkCashDeskTicketOut.IsChecked;
                oTickets.IsPrintedInMachine  = (bool)chkTicketOut.IsChecked;
                prgViewAll.Value            += 20;
            });

            List <TicketExceptions> lstTitoTicketsPrinted = busTreasury.TitoTicketsPrinted(oTickets, lstPositionstoDisplay);

            if (lstTitoTicketsPrinted != null)
            {
                foreach (TicketExceptions exep in lstTitoTicketsPrinted)
                {
                    System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
                    {
                        if ((bool)chkCashDeskTicketOut.IsChecked && (bool)chkTicketOut.IsChecked)
                        {
                            lstTicketsClaimed.Add(exep);
                        }
                    });


                    CashDeskPrintedQty += exep.CashDeskPrintedQty;
                    MachinePrintedQty  += exep.MachinePrintedQty;
                }
                if (lstTitoTicketsPrinted != null && lstTitoTicketsPrinted.Count > 0)
                {
                    currEGM      = lstTitoTicketsPrinted[0].currEGM;
                    currCashdesk = lstTitoTicketsPrinted[0].CurrentCashDesk;
                    cTicketPrintedTotalCashdesk += currCashdesk;
                    cTicketPrintedTotalEGM      += currEGM;
                }
            }


            szErrDesc     = "pre refunds";
            oTickets.Type = TREASURY_REFUND;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsLiability = (bool)chkRefunds.IsChecked;
                prgViewAll.Value    += 20;
            });
            List <TicketExceptions> RefundItems = busTreasury.GetTreasuryItems(oTickets, lstPositionstoDisplay);

            if (RefundItems != null)
            {
                foreach (TicketExceptions item in RefundItems)
                {
                    lstTicketsClaimed.Add(item);
                    cRefundTotal += item.TreasuryAmount;
                    RefundQty    += item.HandpayQty;
                }
            }

            szErrDesc     = "pre refill";
            oTickets.Type = TREASURY_REFILL;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsLiability = (bool)chkRefills.IsChecked;
            });
            List <TicketExceptions> RefillItems = busTreasury.GetTreasuryItems(oTickets, lstPositionstoDisplay);

            if (RefillItems != null)
            {
                foreach (TicketExceptions item in RefillItems)
                {
                    lstTicketsClaimed.Add(item);
                    cRefillTotal += item.TreasuryAmount;
                    RefillQty    += item.HandpayQty;
                }
            }

            szErrDesc     = "pre shortpay";
            oTickets.Type = TREASURY_SHORTPAY;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsLiability = (bool)chkShortPays.IsChecked;
            });
            List <TicketExceptions> ShortpayItems = busTreasury.GetTreasuryItems(oTickets, lstPositionstoDisplay);

            if (ShortpayItems != null)
            {
                foreach (TicketExceptions item in ShortpayItems)
                {
                    lstTicketsClaimed.Add(item);
                    cShortpayTotal += item.TreasuryAmount;
                    ShortpayQty    += item.HandpayQty;
                }
            }

            szErrDesc     = "Handpays";
            oTickets.Type = TREASURY_HANDPAY_CREDIT;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsLiability = (bool)chkHandpays.IsChecked;
                prgViewAll.Value    += 20;
            });
            List <TicketExceptions> Handpays = busTreasury.GetTreasuryItems(oTickets, lstPositionstoDisplay);

            if (Handpays != null)
            {
                foreach (TicketExceptions item in Handpays)
                {
                    lstTicketsClaimed.Add(item);
                    cHandPayTotal += Convert.ToDouble(item.Amount);
                    HandpayQty    += item.HandpayQty;
                }
            }

            szErrDesc     = "pre cash desk float";
            oTickets.Type = TREASURY_CASH_DESK_FLOAT;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsLiability = (bool)chkCashDeskFloat.IsChecked;
            });
            List <TicketExceptions> CashDeskFloatItems = busTreasury.GetTreasuryItems(oTickets, lstPositionstoDisplay);

            if (CashDeskFloatItems != null)
            {
                foreach (TicketExceptions item in CashDeskFloatItems)
                {
                    lstTicketsClaimed.Add(item);
                    cCashDeskFloatTotal += item.TreasuryAmount;
                    CashDeskFloatQty    += item.HandpayQty;
                }
            }

            szErrDesc     = "Progressive";
            oTickets.Type = TREASURY_PROGRESSIVE;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsLiability = (bool)chkProghandpays.IsChecked;
            });
            List <TicketExceptions> ProgItems = busTreasury.GetTreasuryItems(oTickets, lstPositionstoDisplay);

            if (ProgItems != null)
            {
                foreach (TicketExceptions item in ProgItems)
                {
                    lstTicketsClaimed.Add(item);
                    cProgressiveTotal += item.TreasuryAmount;
                    ProgressiveQty    += item.HandpayQty;
                }
            }

            szErrDesc     = "Jackpot";
            oTickets.Type = TREASURY_JACKPOT;
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                oTickets.IsLiability = (bool)chkjackpot.IsChecked;
            });
            List <TicketExceptions> JackPotItems = busTreasury.GetTreasuryItems(oTickets, lstPositionstoDisplay);

            if (JackPotItems != null)
            {
                foreach (TicketExceptions item in JackPotItems)
                {
                    lstTicketsClaimed.Add(item);
                    cJackpotTotal += item.TreasuryAmount;
                    JackpotQty    += item.HandpayQty;
                }
            }

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgViewAll.Value            += 20;
                txtCashDeskTicketInVal.Text  = cTicketClaimedTotalCashdesk.ToString(MYFORMAT);
                txtMachineTicketInVal.Text   = cTicketClaimedTotalEGM.ToString(MYFORMAT);
                txtMachineTicketOutVal.Text  = cTicketPrintedTotalEGM.ToString(MYFORMAT);
                txtCashDeskTicketOutVal.Text = cTicketPrintedTotalCashdesk.ToString(MYFORMAT);
                txtLiabilityVal.Text         = ((cTicketPrintedTotalEGM + cTicketPrintedTotalCashdesk) -
                                                (cTicketClaimedTotalEGM + cTicketClaimedTotalCashdesk)).ToString(MYFORMAT);

                txtExcepVal.Text   = cTicketInExceptions.ToString(MYFORMAT) + "/" + cTicketOutExceptions.ToString(MYFORMAT);
                txtActiveVal.Text  = cTicketsUnclaimed.ToString(MYFORMAT);
                txtVoidval.Text    = cTicketsVoid.ToString(MYFORMAT) + "/" + cTicketCancelled.ToString(MYFORMAT);
                txtExpiredVal.Text = cTicketsExpired.ToString(MYFORMAT);

                txtRefundVal.Text            = cRefundTotal.ToString(MYFORMAT);
                txtFillsVal.Text             = cRefillTotal.ToString(MYFORMAT);
                txtCashDeskShortPaysVal.Text = cShortpayTotal.ToString(MYFORMAT);
                txtHandpayVal.Text           = cHandPayTotal.ToString(MYFORMAT);
                txtCashDeskFloatVal.Text     = cCashDeskFloatTotal.ToString(MYFORMAT);
                txtProgHandpayVal.Text       = cProgressiveTotal.ToString(MYFORMAT);
                txtJackpotVal.Text           = cJackpotTotal.ToString(MYFORMAT);
            });
            double promoTotal = 0;
            List <TicketExceptions> lstPromo = busTreasury.GetPromoCashableTickets(oTicketsClaimed, lstPositionstoDisplay);

            if (lstPromo != null)
            {
                foreach (TicketExceptions item in lstPromo)
                {
                    promoTotal += item.Value;
                }
            }
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                txtPromoCashableVal.Text = promoTotal.ToString(MYFORMAT);

                txtHandpayQty.Text           = HandpayQty.ToString();
                txtProgHandpayQty.Text       = ProgressiveQty.ToString();
                txtJackPotQty.Text           = JackpotQty.ToString();
                txtRefundQty.Text            = RefundQty.ToString();
                txtFillsQty.Text             = RefillQty.ToString();
                txtCashDeskShortPayQty.Text  = ShortpayQty.ToString();
                txtCashDeskFloatQty.Text     = CashDeskFloatQty.ToString();
                txtCashDeskTicketInQty.Text  = CashDeskClaimedQty.ToString();
                txtMachineTicketInQty.Text   = MachineClaimedQty.ToString();
                txtCashDeskTicketOutQty.Text = CashDeskPrintedQty.ToString();
                txtMachineTicketOutQty.Text  = MachinePrintedQty.ToString();
            });
            HandpayQty         = 0;
            ProgressiveQty     = 0;
            JackpotQty         = 0;
            RefundQty          = 0;
            RefillQty          = 0;
            ShortpayQty        = 0;
            CashDeskFloatQty   = 0;
            CashDeskClaimedQty = 0;
            CashDeskPrintedQty = 0;
            MachineClaimedQty  = 0;
            MachinePrintedQty  = 0;

            return(lstTicketsClaimed);
        }
        private List <TicketExceptions> LoadActiveTickets()
        {
            busTreasury = new TreasuryTransactions();
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvActiveTickets.Items.Clear();
            });

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

            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate + " " + StartTime;
            oTicketsClaimed.TicketsClaimedTo   = EndDate + " " + EndTime;

            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate + " " + EndTime;
            oTickets.StartDate   = StartDate + " " + StartTime;
            oTickets.IsLiability = false;
            oTickets.BarCode     = "%";
            oTickets.Type        = "U";

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgActiveTickets.Value += 50;
            });
            List <TicketExceptions> lstTitoTicketsUnclaimed = busTreasury.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 = busTreasury.TicketsUnclaimed(oTicketsClaimed, lstPositionstoDisplay);

            if (lstTicketsUnClaimed != null)
            {
                foreach (TicketExceptions item in lstTicketsUnClaimed)
                {
                    lstTitoTicketsUnclaimed.Add(item);
                }

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

            return(lstTitoTicketsUnclaimed);
        }
        private List <TicketExceptions> LoadLiabilities()
        {
            busTreasury = new TreasuryTransactions();
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                lvLiability.Items.Clear();
            });
            List <string> lstPositionstoDisplay = busTreasury.FillListOfFilteredPositions(RouteNumber);


            TicketsClaimed oTicketsClaimed = new TicketsClaimed();

            oTicketsClaimed.TicketsClaimedFrom = StartDate + " " + StartTime;
            oTicketsClaimed.TicketsClaimedTo   = EndDate + " " + EndTime;

            Tickets oTickets = new Tickets();

            oTickets.EndDate     = EndDate + " " + EndTime;
            oTickets.StartDate   = StartDate + " " + StartTime;
            oTickets.IsLiability = true;
            oTickets.BarCode     = "%";
            oTickets.Type        = "C";

            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgLiability.Value += 50;
            });
            List <TicketExceptions> lstTitoTicketsClaimed = busTreasury.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 = busTreasury.TitoTicketsPrintedLiability(oTickets, lstPositionstoDisplay);

            //lvLiability.ItemsSource = lstTitoTicketsPrinted;

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

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

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


            float            ExceptionTotal = 0F;
            TicketExceptions Total          = new TicketExceptions();

            Total.PrintDate = "Total";
            foreach (TicketExceptions exep in lstTitoTicketsClaimed)
            {
                ExceptionTotal += (float)exep.Value;
            }
            Total.Value  = ExceptionTotal;
            Total.Amount = ExceptionTotal.ToString();
            lstTitoTicketsClaimed.Insert(0, Total);
            System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate
            {
                prgLiability.Value += 50;
            });

            return(lstTitoTicketsClaimed);
        }