Example #1
0
 public void Start()
 {
     try
     {
         mainWindow.LoadNextView();
     }
     catch (Exception e) {
         var logger = LogHelper.getInstance();
         logger.Log(Models.Logging.LogType.DbLog, this.GetType().ToString(), "LoadNextView", e.Message);
     }
 }
Example #2
0
        public void LoadNextView()
        {
            Customer customer = new Customer();

            customer.Name         = NameTextBox;
            customer.Email        = EmailTextBox;
            customer.MobileNumber = MobileTextBox;
            customer.Address      = AddressTextBox;
            try {
                ResetErrorsTexts();
                if (customer.MassValidation())
                {
                    var order = Order.getInstance();
                    order.Customer = customer;
                    try
                    {
                        mainWindow.LoadNextView();
                    }
                    catch (Exception e) {
                        var logger = LogHelper.getInstance();
                        logger.Log(Models.Logging.LogType.DbLog, this.GetType().ToString(), "LoadNextView", e.Message);
                    }
                }
            }
            catch (CustomerNameErrorException)
            {
                NameError = "Invalid name. eg.: John Smith";
            }
            catch (CustomerEmailErrorException)
            {
                EmailError = "Invalid email. eg.: [email protected]";
            }
            catch (CustomerMobileNumberErrorException)
            {
                MobilError = "Invalid mobile number. eg.: +36701234567";
            }
            catch (CustomerAddressErrorException)
            {
                AddressError = "Invalid address. eg.: 3300 Eger, Leányka utca 2.";
            }
            catch (Exception e)
            {
                var logger = LogHelper.getInstance();
                logger.Log(Models.Logging.LogType.DbLog, this.GetType().ToString(), "LoadNextView", e.Message);
            }
        }
Example #3
0
 public void LoadNextView()
 {
     try
     {
         if (Order.AllToppings.AllToppings.Count == 0)
         {
             MessageBox.Show("You must select atleast one topping Topping first!");
             return;
         }
         order.AddAt(Order.AllToppings, 3);
         mainWindow.LoadNextView();
     }
     catch (Exception e)
     {
         var logger = LogHelper.getInstance();
         logger.Log(Models.Logging.LogType.DbLog, this.GetType().ToString(), "LoadNextView", e.Message);
     }
 }
Example #4
0
 public void LoadNextView()
 {
     try
     {
         if (SelectedMeat == null)
         {
             MessageBox.Show("You must selected a Meat first!");
             return;
         }
         order.Remove(SelectedMeat);
         order.Meat = SelectedMeat;
         order.AddAt(SelectedMeat, 2);
         mainWindow.LoadNextView();
     }
     catch (Exception e) {
         var logger = LogHelper.getInstance();
         logger.Log(Models.Logging.LogType.DbLog, this.GetType().ToString(), "LoadNextView", e.Message);
     }
 }
Example #5
0
 public void LoadNextView()
 {
     mainWindow.LoadNextView();
 }