Example #1
0
        private void DecreaseTicketNo(object sender, EventArgs e)
        {
            if (TicketNumbers > 1)
            {
                TicketNumbers--;
                NoOfTickets.Text   = TicketNumbers.ToString();
                TotalAmount        = (TicketAmount * TicketNumbers);
                AmountPayable.Text = TotalAmount.ToString();
                TaazaRedemed       = TicketNumbers * TaazaCashPerTicket;

                if (TaazaRedemed <= WalletBalance && TaazaRedemed <= TaazaCashLimit)
                {
                    TaazaPayable.Text = TaazaRedemed.ToString();
                }
                else
                {
                    TaazaRedemed      = (WalletBalance < TaazaCashLimit) ? WalletBalance : TaazaCashLimit;
                    TaazaPayable.Text = TaazaRedemed.ToString();
                }

                if ((TotalAmount - TaazaRedemed) >= 0)
                {
                    NetPayable.Text = (TotalAmount - TaazaRedemed).ToString();
                }
            }
        }
Example #2
0
        private async void LoadEventPaymentDetails(int EventPriceId)
        {
            try
            {
                List <KeyValuePair <string, string> > parameters = new List <KeyValuePair <string, string> >
                {
                    new KeyValuePair <string, string>("company_code", Constant.CompanyID),
                    new KeyValuePair <string, string>("event_id", EventID),
                    new KeyValuePair <string, string>("user_id", AppData.UserId),
                    new KeyValuePair <string, string>("price_id", EventPriceId.ToString())
                };

                var jsonstr = await wrapper.GetResponseAsync(Constant.APIs[(int)Constant.APIName.BookEvent], parameters);

                if (jsonstr.ToString() == "NoInternet")
                {
                    // NoInternet.IsVisible = true;
                    // Loader.IsVisible = false;
                }
                else
                {
                    var      Items = JsonConvert.DeserializeObject <EventDetailsResponseModel>(jsonstr);
                    string[] price = Items.data.event_details.event_price.ticket_price.Split('.');
                    AmountPayable.Text = price[0];
                    NetPayable.Text    = price[0];
                    TicketAmount       = Convert.ToInt32(price[0]);
                    TotalAmount        = TicketAmount;
                    NetAmount          = TotalAmount;
                    MaxTickets         = Convert.ToInt32(Items.data.event_details.event_price.available_seat);
                    string[] balance = Items.data.event_details.current_wallet_balance.Split('.');
                    WalletBalance     = Convert.ToInt32(balance[0]);
                    TaazaCashLimit    = Convert.ToInt32(Items.data.event_details.maximum_taazacash_can_use);
                    TaazaRedemed      = TaazaCashPerTicket;
                    TaazaPayable.Text = TaazaCashPerTicket.ToString();
                    NoOfTickets.Text  = TicketNumbers.ToString();
                }
            }

            catch (Exception ex)
            {
            }
            // You will get AmountPayable here
            //Net Payable is Same as Amount Payable
            // Get Wallet Balance Here
        }
Example #3
0
        public PayConfirmPage(string RestaurantId, string BannerSrc, string BannerHeading)
        {
            InitializeComponent();
#if __IOS__
            //Set Padding For the top of the page
            this.Padding = new Thickness(0, 20, 0, 0);
#endif
            SeatsOrTickets.Text          = "No. of Seats";
            IsEvent                      = false;
            TaazaCashAmount.Text         = AppData.TaazaCash;
            RestaurantDirected.IsVisible = true;
            RestBookDate.Date            = DateTime.Now;
            SelecetedDate                = DateTime.Now;
            RestBookDate.MaximumDate     = DateTime.Now.AddDays(30);
            RestBookDate.MinimumDate     = DateTime.Now;
            RestID               = RestaurantId;
            TopImage.Source      = BannerSrc;
            TopText.Text         = BannerHeading;
            TopSubText.IsVisible = false;
            NoOfTickets.Text     = TicketNumbers.ToString();
            LoadRestPaymentDetails();
        }