private void DoRequest(object sender, RoutedEventArgs e)
        {
            int id;

            Int32.TryParse(itemQtyText.Text, out id);
            RequestItemController.DoPurchaseRequest(itemNameText.Text, itemDescText.Text, id);
            RequestItemPage requestItemPage = new RequestItemPage();

            this.NavigationService.Navigate(requestItemPage);
            MessageBox.Show("Your request has been sent !");
        }
Esempio n. 2
0
        private void DoRequest(object sender, RoutedEventArgs e)
        {
            int money;

            Int32.TryParse(moneyPrice.Text, out money);

            if (!moneyPrice.Text.Equals(""))
            {
                RequestItemController.DoFundRequest(money, reasonDescText.Text, true);
                PurchaseHomePage purchaseHomePage = new PurchaseHomePage();
                this.NavigationService.Navigate(purchaseHomePage);
            }
            else
            {
                RequestItemController.DoFundRequest(money, reasonDescText.Text, false);
                RequestItemPage requestItemPage = new RequestItemPage();
                this.NavigationService.Navigate(requestItemPage);
            }
            MessageBox.Show("Your request has been sent !");
        }