Exemplo n.º 1
0
        private void Submit()
        {
            string  email    = txbSInEmail.Text;
            string  password = txbSInPassword.Text;
            Account account  = new AccountORM().Find(email, password);

            if (account == null)
            {
                MessageBox.Show("email ou mot de passe incorrectes");
            }
            else
            {
                Form mainForm;
                if (account.type == "Manager")
                {
                    mainForm = new FormManagerHome();
                }
                else
                {
                    mainForm = new FormWaiterHome(account.id);
                }
                mainForm.Show();
                ClearForm();
                Hide();
            }
        }
Exemplo n.º 2
0
 private void tbxAccSearchName_TextChanged(object sender, EventArgs e)
 {
     if (tbxAccSearchName.Text.Equals(""))
     {
         refreshData();
     }
     else
     {
         DataTable data = new AccountORM().Search(tbxAccSearchName.Text);
         dgvAcc.DataSource = data;
     }
 }
Exemplo n.º 3
0
        public void Edit()
        {
            AccountORM accountORM = new AccountORM();
            Account    account    = Build();

            if (account.password == "")
            {
                accountORM.EditWithoutPassword(account);
            }
            else
            {
                accountORM.Edit(account);
            }
        }
Exemplo n.º 4
0
        public void Create()
        {
            AccountORM accountORM = new AccountORM();

            accountORM.Create(Build());
        }