예제 #1
0
        private void btnaddusers_Click(object sender, EventArgs e)
        {
            Customer newcustomer = null;

            if (txtAdress.Text != "" && txtEmail.Text != "" && txtName.Text != "" && txtPassword.Text != "" && txtUsername.Text != "")
            {
                if (cbIsAdmin.Checked)
                {
                    newcustomer = new AdminUser(txtName.Text, txtAdress.Text, txtEmail.Text, txtUsername.Text, txtPassword.Text, Convert.ToInt32(dtgUsers.CurrentRow.Cells[2].Value));
                }

                else
                {
                    newcustomer = new Customer(txtName.Text, txtAdress.Text, txtEmail.Text, txtUsername.Text, txtPassword.Text, Convert.ToInt32(dtgUsers.CurrentRow.Cells[2].Value));
                }

                adminUser.addCustomer(newcustomer);
            }
        }
예제 #2
0
 public AdminInterfaceForm(AdminUser adminUser)
 {
     this.adminUser  = adminUser;
     Product.Idcount = data.getcount("product");
     InitializeComponent();
 }