private void button1_Click(object sender, EventArgs e) { FormKhach f = new FormKhach(); this.Hide(); f.Show(); }
private void button2_Click(object sender, EventArgs e) { DialogResult re = MessageBox.Show("Bạn có muốn hủy không?", "Cảnh báo", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (re == DialogResult.Yes) { this.Hide(); Form f = new FormKhach(); f.Show(); } }
private void button1_Click(object sender, EventArgs e) { if (taikhoan.Text == "") { MessageBox.Show("Bạn chưa nhập tài khoản"); taikhoan.Focus(); } else if (matkhau.Text == "") { MessageBox.Show("Bạn chưa nhập mật khẩu"); matkhau.Focus(); } else if (user.Equals(taikhoan.Text) && pass.Equals(matkhau.Text)) { MessageBox.Show("Đăng nhập thành công"); Form f = new Formchinh(); f.Show(); this.Show(); this.taikhoan.Text = ""; this.matkhau.Text = ""; } else { if (khach.Equals(taikhoan.Text) && pass2.Equals(matkhau.Text)) { MessageBox.Show("Đăng nhập thành công"); Form f = new FormKhach(); f.Show(); this.Show(); this.taikhoan.Text = ""; this.matkhau.Text = ""; } else { MessageBox.Show("Tên đăng nhập hoặc mật khẩu sai"); } } }