Example #1
0
        private void LoadInfoHoaDon()
        {
            string str;

            str                   = "SELECT MaNV FROM tbHoaDon WHERE MaHD = '" + txtMaHD.Text + "'";
            coBMaNV.Text          = ConnectToSQL.GetFieldValues(str);
            str                   = "SELECT MaKH FROM tbHoaDon WHERE MaHD = '" + txtMaHD.Text + "'";
            txtMaKH.Text          = ConnectToSQL.GetFieldValues(str);
            str                   = "SELECT TenNhanVien FROM tbNhanVien WHERE MaNV = '" + coBMaNV.Text + "'";
            txtTenNV.Text         = ConnectToSQL.GetFieldValues(str);
            str                   = "SELECT TenKhachHang FROM tbKhachHang WHERE MaKH = '" + txtMaKH.Text + "'";
            txtTenKH.Text         = ConnectToSQL.GetFieldValues(str);
            str                   = "SELECT DiaChi FROM tbKhachHang WHERE MaKH = '" + txtMaKH.Text + "'";
            txtDiaChi.Text        = ConnectToSQL.GetFieldValues(str);
            str                   = "SELECT SDT FROM tbKhachHang WHERE MaKH = '" + txtMaKH.Text + "'";
            txtSdt.Text           = ConnectToSQL.GetFieldValues(str);
            str                   = "SELECT TongThanhTien FROM tbHoaDon WHERE MaHD = '" + txtMaHD.Text + "'";
            txtTongThanhTien.Text = ConnectToSQL.GetFieldValues(str);
        }