private void btnBack_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormProfile fp = new FormProfile(customer.audio_tier, customer);

            fp.Show();
        }
Exemplo n.º 2
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            String cutomerEmail = tbEmail.Text; // izmeni nije username nego name

            tbPassword.PasswordChar = '\0';
            String customerPassword = tbPassword.Text;

            customer      = DataProvider.GetCustomer(tbEmail.Text, tbPassword.Text, comboPlatform.SelectedItem.ToString());
            audioPlatform = customer.audio_tier;

            if (customer.name == null)
            {
                MessageBox.Show("Login failed", "Try again",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation);
                tbPassword.PasswordChar = '*';
            }
            else
            {
                if (customer.name.Equals("Admin1") || customer.name.Equals("Admin2"))
                {
                    Admin af = new Admin(customer);
                    af.Show();
                    if (af.DialogResult == DialogResult.OK)
                    {
                        af.Close();
                    }
                }
                else
                {
                    FormProfile profile = new FormProfile(audioPlatform, customer);
                    profile.Show();
                }
            }
            this.Hide();
        }
        private void CustomerAccount_FormClosed(object sender, FormClosedEventArgs e)
        {
            FormProfile fp = new FormProfile(customer.audio_tier, customer);

            fp.Show();
        }