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(); } }
private void tbxAccSearchName_TextChanged(object sender, EventArgs e) { if (tbxAccSearchName.Text.Equals("")) { refreshData(); } else { DataTable data = new AccountORM().Search(tbxAccSearchName.Text); dgvAcc.DataSource = data; } }
public void Edit() { AccountORM accountORM = new AccountORM(); Account account = Build(); if (account.password == "") { accountORM.EditWithoutPassword(account); } else { accountORM.Edit(account); } }
public void Create() { AccountORM accountORM = new AccountORM(); accountORM.Create(Build()); }