private void Btn_ThanhToan_Click(object sender, EventArgs e) { this.Hide(); frmNhanVien frm = new frmNhanVien(); frm.ShowDialog(); this.Close(); }
private void Btn_XacNhan_Click(object sender, EventArgs e) { if (tien == 0 || tb_Ban.Text == "") { } else { hd.CapNhatBan(int.Parse(tb_Ban.Text), mahdtam); this.Hide(); frmNhanVien frm = new frmNhanVien(); frm.ShowDialog(); this.Close(); } }
private void btn_Huy_Click(object sender, EventArgs e) { this.Hide(); int tam = hd.LayIDHoaDon(); int tam1 = mahdtam; hd.HuyHoaDon(mahdtam); ct.xoaCTHDver2(tam1); if (tam == tam1) { hd.ResetMaHoaDon(mahdtam); } frmNhanVien frm = new frmNhanVien(); frm.ShowDialog(); this.Close(); }
private void Btn_DangNhap_Click(object sender, EventArgs e) { if (tb_UserName.Text == "" && tb_Password.Text == "") { MessageBox.Show("Vui lòng nhập tên tài khoản và mật khẩu!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); tb_UserName.Focus(); return; } if (tb_UserName.Text == "") { MessageBox.Show("Vui lòng nhập tên tài khoản!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); tb_UserName.Focus(); return; } if (tb_Password.Text == "") { MessageBox.Show("Vui lòng nhập mật khẩu!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); tb_Password.Focus(); return; } if (nv.DangNhap(tb_UserName.Text, tb_Password.Text) == "1") { //hien form nhan vien this.Hide(); frmNhanVien frm = new frmNhanVien(); frm.ShowDialog(); this.Close(); //MessageBox.Show("Form nhan vien."); } else if (nv.DangNhap(tb_UserName.Text, tb_Password.Text) == "0") { //hien form quan li this.Hide(); frmQuanLi frm = new frmQuanLi(); frm.ShowDialog(); this.Close(); //MessageBox.Show("Form quan li."); } else { MessageBox.Show("Không tồn tại tài khoản.", "Thông báo.", MessageBoxButtons.OK, MessageBoxIcon.Information); } }