private void btthoat_Click(object sender, EventArgs e) { this.Hide(); QuanLyBanXe_View qlbxv = new QuanLyBanXe_View(); qlbxv.Show(); }
private void btthoat_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show("Bạn có chắc muốn xóa", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) { this.Hide(); qlbs.Show(); } }
private void btthoat_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show("Bạn có chắc muốn thoát?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) { this.Hide(); QuanLyBanXe_View qlbx = new QuanLyBanXe_View(); qlbx.Show(); } }
private void button1_Click(object sender, EventArgs e) { if (txttk.Text == "") { MessageBox.Show("Bạn cần nhập tài khoản", "Thông báo"); } else if (txtmk.Text == "") { MessageBox.Show("Bạn cần nhập mật khẩu", "Thông báo"); } else { string a = txttk.Text; string b = txtmk.Text; DataTable dt = new DataTable(); dt = nvbus.KiemTraDN(a, b); if (dt.Rows.Count > 0) { lbstatus.ForeColor = Color.Red; lbstatus.Text = "Đăng nhập thành công"; string cv = nvbus.LayThongTinChucVu(a); if (cv == "thukho") { this.Hide(); ThuKho_View tk = new ThuKho_View(); tk.Show(); } else if (cv == "banhang") { this.Hide(); BanHang_View bh = new BanHang_View(); bh.Show(); } else if (cv == "nhaphang") { this.Hide(); NhapHang_View nh = new NhapHang_View(); nh.Show(); } else { this.Hide(); qlbxv.Show(); } } else { lbstatus.ForeColor = Color.Red; lbstatus.Text = "Đăng nhập thất bại"; txttk.Text = ""; txtmk.Text = ""; } } }
private void btdoimk_Click(object sender, EventArgs e) { string c, b; try { if (txtmkcu.Text == "") { lbstatus.ForeColor = Color.Red; lbstatus.Text = "Bạn chưa nhập mật khẩu cũ"; } else if (txtmkmoi.Text == "") { lbstatus.ForeColor = Color.Red; lbstatus.Text = "Bạn chưa nhập mật khẩu mới"; } else if (txtmkmoi1.Text == "") { lbstatus.ForeColor = Color.Red; lbstatus.Text = "Bạn chưa nhập lại mật khẩu mới"; } else { int a = nvbus.KiemTraPass(txtmkcu.Text); if (a <= 0) { MessageBox.Show("Mật khẩu cũ của bạn không đúng!", "Thông báo"); } else { if (txtmkmoi.Text != txtmkmoi1.Text) { MessageBox.Show("Mật khẩu mới và nhập lại mật khẩu mới không trùng nhau!", "Thông báo"); } else { c = txtmkmoi.Text; b = txtmkcu.Text; nvbus.SuaMatKhau(c, b); MessageBox.Show("Đỗi mật khẩu thành công!", "Thông báo"); this.Hide(); QuanLyBanXe_View qlbx = new QuanLyBanXe_View(); qlbx.Show(); } } } } catch { MessageBox.Show("Không thế sửa", "Thông báo"); } }