Exemple #1
0
        private void login_Click(object sender, EventArgs e)
        {
            this._loginVO = this._loginBUS.getUser(textUser.Text, textPassw.Text);

            if (this._loginVO.type == null)
            {
                MessageBox.Show("Incorrect username or password!", "Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else if (this._loginVO.type == "Customer")

            {
                //MessageBox.Show(_loginVO.idClient.ToString(), "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Hide();
                FormClient fc = new FormClient();
                fc.setId(this._loginVO.idClient);
                DataGridView dataGrid = fc.getGrid();
                fc.refreshGrid(this._loginVO.idClient);
                fc.Show();
            }
            else
            {
                this.Hide();
                FormAdmin fa = new FormAdmin();
                fa.refreshGrid();
                fa.Show();
            }
        }