예제 #1
0
 public ProfilSettings(CustomerHomePage customerHomePage, ICustomerService customerService, CustomerInfoResponse customer)
 {
     InitializeComponent();
     this.customerHomePage = customerHomePage;
     this.customerService  = customerService;
     this.customer         = customer;
 }
예제 #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);
            }
        }
예제 #3
0
 public PastOperations(CustomerHomePage customerHomePage, CustomerInfoResponse customer)
 {
     InitializeComponent();
     this.customerHomePage = customerHomePage;
     this.customer         = customer;
 }
예제 #4
0
 public DiscoverProduct(CustomerHomePage customerHomePage, CustomerInfoResponse customer)
 {
     InitializeComponent();
     this.customerHomePage = customerHomePage;
     this.customer         = customer;
 }