public ProfilSettings(CustomerHomePage customerHomePage, ICustomerService customerService, CustomerInfoResponse customer)
 {
     InitializeComponent();
     this.customerHomePage = customerHomePage;
     this.customerService  = customerService;
     this.customer         = customer;
 }
Exemple #2
0
        private void CustomerLogIn_Click(object sender, EventArgs e)
        {
            try
            {
                if (!(customerEmail.Text.Contains("@") && customerEmail.Text.Contains(".com")))
                {
                    MessageBox.Show("Please,enter a correct email", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    if (customerPassword.Text == "")
                    {
                        MessageBox.Show("Please,enter a correct password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else
                    {
                        if (customerService.LogIn(new Contracts.Request.Customer.CustomerLogInRequest(customerEmail.Text, customerPassword.Text)))
                        {
                            ShowAutoClosingMessageBox("Log In successfull! ", "Successfull");

                            CustomerHomePage customerHomePage = new CustomerHomePage(this, customerEmail.Text, customerPassword.Text);
                            this.Hide();
                            clear();
                            customerHomePage.Show();
                        }
                        else
                        {
                            MessageBox.Show("Incorrect email or password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #3
0
 public PastOperations(CustomerHomePage customerHomePage, CustomerInfoResponse customer)
 {
     InitializeComponent();
     this.customerHomePage = customerHomePage;
     this.customer         = customer;
 }
 public DiscoverProduct(CustomerHomePage customerHomePage, CustomerInfoResponse customer)
 {
     InitializeComponent();
     this.customerHomePage = customerHomePage;
     this.customer         = customer;
 }