コード例 #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormProfile fp = new FormProfile(customer.audio_tier, customer);

            fp.Show();
        }
コード例 #2
0
        public CustomerAccount(Customer c, FormProfile p)
        {
            InitializeComponent();
            customer = c;
            profile  = p;
            FillControls(customer);
            ToolTip l = new ToolTip();

            l.SetToolTip(dataGridView1, "You can extend contract date here");
        }
コード例 #3
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();
        }
コード例 #4
0
        private void CustomerAccount_FormClosed(object sender, FormClosedEventArgs e)
        {
            FormProfile fp = new FormProfile(customer.audio_tier, customer);

            fp.Show();
        }