Ejemplo n.º 1
0
 private void ThemSanPham(string maHD, string maSP, int soLuongBan, double donGiaBan, DateTime ngayLap, string maNhanVien)
 {
     if (!string.IsNullOrEmpty(maHD) && !string.IsNullOrEmpty(maSP))
     {
         if (bd.InsertHoaDon(ref err, ref rows, maHD, maSP, soLuongBan, donGiaBan, ngayLap, maNhanVien))
         {
             HienThiChiTietHoaDon(maHD);
             HienThiDanhSachSanPham();
         }
         else
         {
             MessageBox.Show(string.Format("Err: {0}", err), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show(string.Format("Chưa chọn tạo mã hóa đơn hoặc mã sản phẩm"), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }