private void button3_Click_1(object sender, EventArgs e) { FrmHome frmHome = new FrmHome(); frmHome.Show(); this.Close(); }
private void btnLog_Click(object sender, EventArgs e) { if (chkAdmin.Checked) { Database.arRecord = Database.ds.Tables["Tabel_user"].Select("username = '******' and password = '******' and status = 'admin'"); if (Database.arRecord.Length != 0) { FrmAwalAdmin frmAdmin; frmAdmin = new FrmAwalAdmin(); frmAdmin.Show(); this.Hide(); } else { MessageBox.Show("Username belum terdaftar"); } } else { Database.arRecord = Database.ds.Tables["Tabel_user"].Select("username = '******' and password = '******' and status = 'member'"); if (Database.arRecord.Length != 0) { FrmHome frmHome; frmHome = new FrmHome(); frmHome.Show(); this.Hide(); } else { MessageBox.Show("Username belum terdaftar"); } } }
private void button1_Click(object sender, EventArgs e) { this.Close(); FrmHome frmhomre = new FrmHome(); frmhomre.Show(); }
private void button1_Click(object sender, EventArgs e) { FrmHome inicio = new FrmHome(); inicio.Show(); this.Close(); }
private void btnIngresar_Click(object sender, EventArgs e) { string username = txtUsuario.Text; string clave = txtContraseña.Text; if (usuarioVal.verificaAcceso(username, clave)) { this.Hide(); FrmHome frmHome = new FrmHome(); frmHome.FormClosed += (s, args) => this.Close(); frmHome.Show(); } else { MessageBox.Show("usuario Incorrecto"); } }
private void btnLogin_Click(object sender, EventArgs e) { QLThuChi.Dao.ThuChi.userDataTable userDataTable = new QLThuChi.Dao.ThuChi.userDataTable(); string username = txtUsername.Text; string password = CommonUtil.GetMd5Hash(txtPassword.Text); int userCount = userTableAdapter.getUserByUsernameAndPassword(userDataTable, username, password); if (userCount == 0) { MessageBox.Show("Tên đăng nhập hoặc Mật khẩu không đúng. Xin vui lòng thử lại.", "Lỗi đăng nhập", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { this.Hide(); FrmHome home = new FrmHome(); home.UserId = userDataTable[0].UserId; home.LoginFullName = userDataTable[0].FullName; home.LoginUserCode = userDataTable[0].Code; home.IsAdmin = userDataTable[0].IsAdmin; home.Show(); } }