private void cmbTimKiem_SelectionChangeCommitted(object sender, EventArgs e) { cmbValue.Items.Clear(); int key = cmbTimKiem.SelectedIndex; DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("KHACHHANG"); while (dr.Read()) { if (key == 0) { cmbValue.Items.Add(dr["ID_KhachHang"].ToString()); } else if (key == 1) { cmbValue.Items.Add(dr["HoTen"].ToString()); } else if (key == 2) { cmbValue.Items.Add(dr["SDT"].ToString()); } else if (key == 3) { cmbValue.Items.Add(dr["Email"].ToString()); } else { cmbValue.Items.Add(dr["DiaChi"].ToString()); } } }
private void cmbTimKiem_SelectionChangeCommitted(object sender, EventArgs e) { cmbValue.Items.Clear(); int key = cmbTimKiem.SelectedIndex; DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("PHIEUKHAOSAT"); if (key == 0) { while (dr.Read()) { cmbValue.Items.Add(dr["ID_PhieuKhaoSat"].ToString()); } } else if (key == 1) { loadTenKH(); } else if (key == 2) { loadBienSoXe(); } else { while (dr.Read()) { cmbValue.Items.Add(dr["YeuCau"].ToString()); } } }
private void cmbTimKiem_SelectionChangeCommitted(object sender, EventArgs e) { cmbValue.Items.Clear(); cmbValue.ResetText(); int key = cmbTimKiem.SelectedIndex; DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("PHIEUDANHGIA"); while (dr.Read()) { if (key == 0) { cmbValue.Items.Add(dr["ID_PhieuDanhGia"].ToString()); } else if (key == 1) { cmbValue.Items.Add(dr["ID_PhieuKhaoSat"].ToString()); } else if (key == 2) { cmbValue.Items.Add(dr["TinhTrangXe"].ToString()); } else { cmbValue.Items.Add(dr["MaBaoHiem"].ToString()); } } }
private void cmbTimKiem_SelectionChangeCommitted(object sender, EventArgs e) { cmbValue.Items.Clear(); int key = cmbTimKiem.SelectedIndex; DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("HOADON_PHIEUVATTU"); if (key == 0) { while (dr.Read()) { cmbValue.Items.Add(dr["ID_HoaDonVatTu"].ToString()); } } else if (key == 1) { while (dr.Read()) { cmbValue.Items.Add(dr["ID_PhieuVatTu"].ToString()); } } else { loadTenVT(); } }
private void cmbTimKiem_SelectionChangeCommitted(object sender, EventArgs e) { cmbValue.Items.Clear(); cmbValue.ResetText(); int key = cmbTimKiem.SelectedIndex; DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("VATTU"); if (key == 0) { while (dr.Read()) { cmbValue.Items.Add(dr["ID_VatTu"].ToString()); } } else if (key == 1) { while (dr.Read()) { cmbValue.Items.Add(dr["TenVatTu"].ToString()); } } else if (key == 2) { while (dr.Read()) { cmbValue.Items.Add(dr["TheLoai"].ToString()); } } else { loadNhaCungCap(); } }
public void loadConbobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader pdg = sqlConn.getDataTable("PHIEUDANHGIA"); while (pdg.Read()) { txtID_PhieuDanhGia.Items.Add(pdg["ID_PhieuDanhGia"].ToString()); } sqlConn.closeConnection(); SqlDataReader pvt = sqlConn.getDataTable("PHIEUVATTU"); while (pvt.Read()) { txtID_PhieuVatTu.Items.Add(pvt["ID_PhieuVatTu"].ToString()); } //cmbTimKiem.SelectedIndex = 0; }
public void loadCombobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader lsc = sqlConn.getDataTable("LENHSUACHUA"); while (lsc.Read()) { cmbID_LenhSuaChua.Items.Add(lsc["ID_LenhSuaChua"].ToString()); } sqlConn.closeConnection(); SqlDataReader nv = sqlConn.getDataTable("NHANVIEN"); while (nv.Read()) { cmbID_NhanVien.Items.Add(nv["ID_NhanVien"].ToString()); cmbTenNV.Items.Add(nv["HoTen"].ToString()); } //cmbTimKiem.SelectedIndex = 0; }
private void loadHangXe() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("HANGXE"); while (dr.Read()) { cmbValue.Items.Add(dr["HangXe"].ToString()); } }
private void loadNhaCungCap() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("NHACUNGCAP"); while (dr.Read()) { cmbValue.Items.Add(dr["TenNCC"].ToString()); } }
public void showLsvHangXe() { clearLsvHangXe(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("HANGXE"); while (dr.Read()) { addList(dr); } }
public void loadCombobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("LENHSUACHUA"); while (dr.Read()) { cmbID_LenhSuaChua.Items.Add(dr["ID_LenhSuaChua"].ToString()); } //cmbTimKiem.SelectedIndex = 0; }
public void showLsvHD_TT() { clearLsvHD_TT(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("HOADON_THANHTOAN"); while (dr.Read()) { addList(dr); } }
public void loadCombobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("PHIEUKHAOSAT"); while (dr.Read()) { cmbID_PhieuKhaoSat.Items.Add(dr["ID_PhieuKhaoSat"].ToString()); } //cmbTimKiem.SelectedIndex = 0; }
public void loadCombobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader kh = sqlConn.getDataTable("KHACHHANG"); while (kh.Read()) { cmbID_KhachHang.Items.Add(kh["ID_KhachHang"].ToString()); cmbTenKH.Items.Add(kh["HoTen"].ToString()); } sqlConn.closeConnection(); SqlDataReader xe = sqlConn.getDataTable("THONGTINXE"); while (xe.Read()) { cmbID_Xe.Items.Add(xe["ID_Xe"].ToString()); cmbBienSoXe.Items.Add(xe["BienSoXe"].ToString()); } //cmbTimKiem.SelectedIndex = 0; }
public void showLsvLenhSuaChua() { clearLsvLenhSuaChua(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("LENHSUACHUA"); while (dr.Read()) { addList(dr); } }
public void showLsvNhanVien() { clearLsvNhanVien(); DAL.sqlConnect conn = new DAL.sqlConnect(); SqlDataReader dr = conn.getDataTable("NHANVIEN"); while (dr.Read()) { addList(dr); } }
public void showLsvPhanCong() { clearLsvPhanCong(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("PHANCONG"); while (dr.Read()) { addList(dr); } }
public void showLsvKhachHang() { clearLsvKhachHang(); DAL.sqlConnect conn = new DAL.sqlConnect(); SqlDataReader dr = conn.getDataTable("KHACHHANG"); while (dr.Read()) { addList(dr); } }
private void loadCombobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader pvt = sqlConn.getDataTable("PHIEUVATTU"); while (pvt.Read()) { cmbID_PhieuVatTu.Items.Add(pvt["ID_PhieuVatTu"].ToString()); } sqlConn.closeConnection(); SqlDataReader vt = sqlConn.getDataTable("VATTU"); while (vt.Read()) { cmbID_VatTu.Items.Add(vt["ID_VatTu"].ToString()); cmbTenVT.Items.Add(vt["TenVatTu"].ToString()); } //cmbTimKiem.SelectedIndex = 0; }
public void showLsvPhieuDanhGia() { clearLsvPhieuDanhGia(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("PHIEUDANHGIA"); while (dr.Read()) { addList(dr); } }
public void showLsvNhaCungCap() { clearLsvNhaCungCap(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("NHACUNGCAP"); while (dr.Read()) { addList(dr); } }
public void showLsvPhieuVatTu() { clearLsvPhieuVatTu(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("PHIEUVATTU"); while (dr.Read()) { addList(dr); } }
private void cmbTimKiem_SelectionChangeCommitted(object sender, EventArgs e) { cmbValue.Items.Clear(); int key = cmbTimKiem.SelectedIndex; DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = null; if (key == 0) { dr = sqlConn.getDataTable("NHANVIEN"); while (dr.Read()) { cmbValue.Items.Add(dr["HoTen"].ToString()); } } else if (key == 1) { dr = sqlConn.getDataTable("NHANVIEN"); while (dr.Read()) { cmbValue.Items.Add(dr["ID_NhanVien"].ToString()); } } else if (key == 2) { dr = sqlConn.getDataTable("QUYENHAN"); while (dr.Read()) { cmbValue.Items.Add(dr["ID_QuyenHan"].ToString()); } } else { dr = sqlConn.getDataTable("NGUOIDUNG"); while (dr.Read()) { cmbValue.Items.Add(dr["TaiKhoan"].ToString()); } } }
public void loadCombobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("NGUOIDUNG"); while (dr.Read()) { cmbTaiKhoan.Items.Add(dr["TaiKhoan"].ToString()); } //cmbTimKiem.SelectedIndex = 0; cmbTaiKhoan.SelectedItem = "read_only"; }
public void loadCombobox() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("NHACUNGCAP"); while (dr.Read()) { cmbID_NCC.Items.Add(dr["ID_NhaCungCap"].ToString()); cmbTenNCC.Items.Add(dr["TenNCC"].ToString()); } //cmbTimKiem.SelectedIndex = 0; }
public void loadCombobox() { //cmbTimKiem.SelectedIndex = 0; DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("HangXe"); while (dr.Read()) { cmbID_HangXe.Items.Add(dr["ID_HangXe"].ToString()); cmbHangXe.Items.Add(dr["HangXe"].ToString()); } //cmbHangXe.SelectedItem = "Audi"; }
public void showLsvCV() { lsvChucVu.Items.Clear(); DAL.sqlConnect conn = new DAL.sqlConnect(); SqlDataReader dr = conn.getDataTable("CHUCVU"); while (dr.Read()) { ListViewItem item = new ListViewItem(); item.Text = dr["MaChucVu"].ToString(); item.SubItems.Add(dr["TenChucVu"].ToString()); lsvChucVu.Items.Add(item); } }
public void loadCombobox() { removeCombobox(); DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("QUYENHAN"); while (dr.Read()) { cmbID_QuyenHan.Items.Add(dr["ID_QuyenHan"].ToString()); } cmbID_QuyenHan.SelectedIndex = 1; //cbbTimKiem.SelectedIndex = 0; //cmbTimKiem.SelectedIndex = 0; }
public void showLsvPVT() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("PHIEUVATTU"); while (dr.Read()) { ListViewItem item = new ListViewItem(); item.Text = dr["ID_PhieuVatTu"].ToString(); item.SubItems.Add(dr["MaNguoiPhuTrach"].ToString()); item.SubItems.Add(dr["ThoiGian"].ToString()); lsvPhieuVatTu.Items.Add(item); } }
public void showLstHangXe() { DAL.sqlConnect sqlConn = new DAL.sqlConnect(); SqlDataReader dr = sqlConn.getDataTable("HANGXE"); while (dr.Read()) { ListViewItem item = new ListViewItem(); item.Text = dr["ID_HangXe"].ToString(); item.SubItems.Add(dr["HangXe"].ToString()); lsvHangXe.Items.Add(item); } }