Esempio n. 1
0
        private async Task GetLoadEarlyPrevious()
        {
            var PreviousTicketData = await new loginPageService().GetDetailByUrl(BetEntry.GetBetEntryByTicketNo + PreviousTicketNoPopup);

            if (PreviousTicketData.Status == 1)
            {
                OrderGridListObservCollection.Clear();
                var DeserializeGridData = JsonConvert.DeserializeObject <List <vw_TicketBetsView> >(PreviousTicketData.Response.ToString());
                TotalAmt = 0;

                PurchaseTicketEnabled = false;
                foreach (var item in DeserializeGridData)
                {
                    if (item.Pick.Length > 3 && item.HouseID == 5)
                    {
                    }
                    else
                    {
                        var Val1 = new BetCollection();
                        Val1.Amt     = item.Amount;
                        Val1.GameID  = item.GameID;
                        Val1.Numbers = Convert.ToInt32(item.Pick);
                        Val1.SB      = item.Form;
                        Val1.House   = item.House;
                        OrderGridListObservCollection.Add(Val1);
                        TotalAmt = TotalAmt + item.Amount;
                    }
                }
                popupPriviewsTickietView = false;
            }
            else
            {
                Application.Current.MainPage.DisplayAlert("Message", "Ticket No Not Found.", "Ok");
            }
        }
Esempio n. 2
0
        private async Task AddInGridAsync()
        {
            if (Validate())
            {
                foreach (var item in ListItemValLate)
                {
                    if (item.chkLate1 == true)
                    {
                        var TransactionNumberVal = await new loginPageService().GetDetailByUrl(BetEntry.GetLottoGameDetailByHouseIdandBalls + item.Late1Id + "&NoOfBalls=" + Numbers.Trim().Length);
                        if (TransactionNumberVal.Status == 1)
                        {
                            var Val1 = JsonConvert.DeserializeObject <BetCollection>(TransactionNumberVal.Response.ToString());

                            Val1.Amt     = Convert.ToDecimal(Amt);
                            Val1.Numbers = Convert.ToInt32(Numbers);
                            Val1.SB      = "S";
                            Val1.House   = item.Late1;
                            OrderGridListObservCollection.Add(Val1);
                            TotalAmt = TotalAmt + Val1.Amt;
                        }
                        ChecboxCheck = true;
                    }
                    if (item.chkLate2 == true)
                    {
                        var TransactionNumberVal = await new loginPageService().GetDetailByUrl(BetEntry.GetLottoGameDetailByHouseIdandBalls + item.Late2Id + "&NoOfBalls=" + Numbers.Trim().Length);
                        if (TransactionNumberVal.Status == 1)
                        {
                            var Val2 = JsonConvert.DeserializeObject <BetCollection>(TransactionNumberVal.Response.ToString());
                            Val2.Amt     = Convert.ToDecimal(Amt);
                            Val2.Numbers = Convert.ToInt32(Numbers);
                            Val2.SB      = "S";
                            Val2.House   = item.Late2;
                            OrderGridListObservCollection.Add(Val2);
                            TotalAmt = TotalAmt + Val2.Amt;
                        }
                        ChecboxCheck = true;
                    }
                    if (item.chkLate3 == true)
                    {
                        var TransactionNumberVal = await new loginPageService().GetDetailByUrl(BetEntry.GetLottoGameDetailByHouseIdandBalls + item.Late3Id + "&NoOfBalls=" + Numbers.Trim().Length);
                        if (TransactionNumberVal.Status == 1)
                        {
                            var Val3 = JsonConvert.DeserializeObject <BetCollection>(TransactionNumberVal.Response.ToString());
                            Val3.Amt     = Convert.ToDecimal(Amt);
                            Val3.Numbers = Convert.ToInt32(Numbers);
                            Val3.SB      = "S";
                            Val3.House   = item.Late3;
                            OrderGridListObservCollection.Add(Val3);
                            TotalAmt = TotalAmt + Val3.Amt;
                        }
                        ChecboxCheck = true;
                    }
                    if (item.chkLate4 == true)
                    {
                        var TransactionNumberVal = await new loginPageService().GetDetailByUrl(BetEntry.GetLottoGameDetailByHouseIdandBalls + item.Late4Id + "&NoOfBalls=" + Numbers.Trim().Length);
                        if (TransactionNumberVal.Status == 1)
                        {
                            var Val4 = JsonConvert.DeserializeObject <BetCollection>(TransactionNumberVal.Response.ToString());
                            Val4.Amt     = Convert.ToDecimal(Amt);
                            Val4.Numbers = Convert.ToInt32(Numbers);
                            Val4.SB      = "S";
                            Val4.House   = item.Late4;
                            OrderGridListObservCollection.Add(Val4);
                            TotalAmt = TotalAmt + Val4.Amt;
                        }
                        ChecboxCheck = true;
                    }
                }
                if (ChecboxCheck == false)
                {
                    Application.Current.MainPage.DisplayAlert("Message", "Please Select CheckBox.", "Ok");
                }

                //Numbers = "";
                //SB = "S";
                //Amt = "";
            }
        }