//Cần code mở ra xem private void btnAdd_Click(object sender, EventArgs e) { if (lblHienHanh.Text == NHANVIEN) { nv.clearText(); if (!nv.Visible) { nv.ShowDialog(); } } if (lblHienHanh.Text == HANGHOA) { hh.clearText(); if (!hh.Visible) { hh.ShowDialog(); } } if (lblHienHanh.Text == KHACHHANG) { kh.clearText(); if (!kh.Visible) { kh.ShowDialog(); } } if (lblHienHanh.Text == NHACUNGCAP) { ncc.clearText(); if (!ncc.Visible) { ncc.ShowDialog(); } } if (lblHienHanh.Text == HOADON) { if (!hd.Visible) { hd.clearText(); DateTime dt = DateTime.Now; hd.txtNgayLap.Text = dt.ToShortDateString(); hd.btnShowKH.Enabled = true; hd.btnThemTiep.Hide(); hd.setTextBox(_hdService.SinhMaHoaDon(), FormLogin.ma, "", DateTime.Now.ToShortDateString()); hd.btnThemTiep.Text = "Tiếp tục"; hd.ShowDialog(this); } } if (lblHienHanh.Text == PHIEUNHAP) { if (!pn.Visible) { //hd.clearText(); pn.txtNgayLap.Text = DateTime.Now.ToShortDateString(); pn.btnShowNCC.Enabled = true; pn.btnTiepTuc.Hide(); //hd.setTextBox(_hdService.SinhMaHoaDon(), FormLogin.ma, "", DateTime.Now.ToShortDateString()); pn.btnTiepTuc.Text = "Tiếp tục"; pn.ShowDialog(this); } } }