Beispiel #1
0
 private void HienThi()
 {
     txt_MaHD.Text            = ma;
     dgvChiTietHDX.DataSource = Bus.DataCTHDX("SELECT MaHDX,TenThuoc, DonViTinh,ChiTietHoaDonXuat.SoLuong,Gia,ThanhTien FROM dbo.HoaDonXuat INNER JOIN dbo.ChiTietHoaDonXuat ON ChiTietHoaDonXuat.MaHDX = HoaDonXuat.MaHoaDon INNER JOIN dbo.Thuoc ON Thuoc.MaThuoc = ChiTietHoaDonXuat.MaThuoc WHERE MaHDX = '" + txt_MaHD.Text + "' and TrangThai=N'Chưa thanh toán'");
     txt_MaHD.Enabled         = false;
     ShowThuoc();
     //ShowT();
 }
 private void HienThiCT()
 {
     dgvChiTietHDX.DataSource = Bus.DataCTHDX("SELECT MaHDX,TenThuoc,DonViTinh,Gia,ChiTietHoaDonXuat.SoLuong,ThanhTien FROM dbo.ChiTietHoaDonXuat INNER JOIN dbo.Thuoc ON Thuoc.MaThuoc = ChiTietHoaDonXuat.MaThuoc where MaHDX like '%" + txtMaHD.Text.Trim() + "%'");
     dgvChiTietHDX.AutoResizeColumns();
 }