public List <TicketExceptions> GetTicketAnomalies(TicketsClaimed oTickets, List <string> lstPositions)
 {
     return(objCashDesk.GetTicketAnomalies(oTickets, lstPositions));
 }
示例#2
0
 public List <TicketExceptions> TicketsClaimed(TicketsClaimed oTickets, List <string> lstPositionstoDisplay)
 {
     return(DBBuilder.TicketsClaimed(oTickets, lstPositionstoDisplay));
 }
 public List <TicketExceptions> TicketsUnclaimed(TicketsClaimed oTickets, List <string> lstPositions)
 {
     return(objCashDesk.TicketsUnclaimed(oTickets, lstPositions));
 }
 public List <TicketExceptions> GetPromoCashableTickets(TicketsClaimed oTickets, List <string> lstPositions)
 {
     return(objCashDesk.GetPromoCashableTickets(oTickets, lstPositions));
 }
示例#5
0
 public List <TicketExceptions> GetTicketAnomalies(TicketsClaimed oTickets, List <string> lstPositions)
 {
     return(cashdeskmanagerDataAccess.RetrieveTicketAnomalies(oTickets, lstPositions));
 }
 public List <TicketExceptions> TicketsPrinted(TicketsClaimed oTickets, List <string> lstPositionstoDisplay)
 {
     return(objCashDesk.TicketsPrinted(oTickets, lstPositionstoDisplay));
 }
示例#7
0
 public List <TicketExceptions> TicketsUnclaimed(TicketsClaimed oTickets, List <string> lstPositions)
 {
     return(cashdeskmanagerDataAccess.TicketsUnClaimed(oTickets, lstPositions));
 }
示例#8
0
        public List <TicketExceptions> GetPromoCashableTickets(TicketsClaimed oTickets, List <string> lstPositions)
        {
            string strTicketInException        = string.Empty;
            List <TicketExceptions> lstTickets = null;
            TicketExceptions        excep      = null;


            try
            {
                DataTable dtTickets = cashdeskmanagerDataAccess.GetPromoTickets(oTickets);
                if (dtTickets == null && dtTickets.Rows.Count < 0)
                {
                }
                else
                {
                    lstTickets = new List <TicketExceptions>();

                    foreach (DataRow row in dtTickets.Rows)
                    {
                        excep         = new TicketExceptions();
                        excep.SEGM    = row["PrintDevice"].ToString();
                        excep.Machine = cashdeskmanagerDataAccess.GetBarPositionFromAsset(row["PrintDevice"].ToString());

                        excep.currValue = (float)Convert.ToDouble(row["iAmount"]) / 100;
                        if (DBCommon.CheckPositionToDisplay(excep.Machine, lstPositions))
                        {
                            excep.Position        = cashdeskmanagerDataAccess.GetBarPositionFromAsset(row["PrintDevice"].ToString());
                            excep.TransactionType = "PROMO";
                            excep.Zone            = row["GameTitle"].ToString();

                            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
                            DateTime dt = DateTime.Parse(row["dtPrinted"].ToString(),
                                                         System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat);


                            //excep.PrintDate = row["dtPrinted"].ToString().ReadDateTimeWithSeconds().ToString();

                            //excep.PayDate = row["dtPrinted"].ToString().ReadDateTimeWithSeconds().ToString();

                            excep.PrintDate = Convert.ToDateTime(row["dtPrinted"]).ToString("dd MMM yyyy HH:mm:ss").ReadDateTimeWithSeconds().ToString();

                            excep.PayDate = Convert.ToDateTime(row["dtPrinted"]).ToString("dd MMM yyyy HH:mm:ss").ReadDateTimeWithSeconds().ToString();

                            excep.Value  = Convert.ToDouble(row["iAmount"]) / 100;
                            excep.Amount = CurrencySymbol + " " + (Convert.ToDecimal(row["iAmount"]) / 100).GetUniversalCurrencyFormat();

                            excep.Status            = (row["StrVoucherStatus"] == "NA" ? "Auto Cancelled" : "Void");
                            excep.cExceptionsTotal += excep.currValue;
                        }
                        else if (DBCommon.IsMachineATicketWorkstation(row["PrintDevice"].ToString()))
                        {
                            excep.Position        = cashdeskmanagerDataAccess.GetBarPositionFromAsset(row["PrintDevice"].ToString());
                            excep.TransactionType = "PROMO";
                            excep.Zone            = row["GameTitle"].ToString();

                            excep.PrintDate = Convert.ToDateTime(row["dtPrinted"]).ToString("dd MMM yyyy HH:mm:ss").ReadDateTimeWithSeconds().ToString();

                            excep.PayDate = Convert.ToDateTime(row["dtPrinted"]).ToString("dd MMM yyyy HH:mm:ss").ReadDateTimeWithSeconds().ToString();

                            excep.Value = Convert.ToDouble(row["iAmount"]) / 100;
                            //excep.Amount = (Convert.ToDouble(row["iAmount"]) / 100).ToString("###0.#0") ;
                            excep.Amount = CurrencySymbol + " " + (Convert.ToDecimal(row["iAmount"]) / 100).GetUniversalCurrencyFormat();

                            excep.Status            = (row["StrVoucherStatus"] == "NA" ? "Auto Cancelled" : "Void");
                            excep.cExceptionsTotal += excep.currValue;
                        }

                        lstTickets.Add(excep);
                    }
                }
            }

            catch (Exception ex)
            {
                LogManager.WriteLog(ex.Message, LogManager.enumLogLevel.Info);
                ExceptionManager.Publish(ex);
            }
            return(lstTickets);
        }
示例#9
0
 public List <TicketExceptions> TicketsPrinted(TicketsClaimed oTickets, List <string> lstPositionstoDisplay)
 {
     return(cashdeskmanagerDataAccess.TicketsPrinted(oTickets, lstPositionstoDisplay));
 }
示例#10
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);
        }
示例#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);
        }