public FrmTimKiemKhachHang(string P_KEYSEARCH) { InitializeComponent(); dgvThongTinKhachHang.Columns["STT"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["STT"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["MAKHACHHANG"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["MAKHACHHANG"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["MATHE"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["MATHE"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["TENKHACHHANG"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["TENKHACHHANG"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["DIACHI"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["DIACHI"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["DIENTHOAI"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["DIENTHOAI"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["CANCUOC_CONGDAN"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["CANCUOC_CONGDAN"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["NGAYSINH"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["NGAYSINH"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["NGAYDACBIET"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["NGAYDACBIET"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["SODIEM"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["SODIEM"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["TONGTIEN"].HeaderCell.Style.Font = new Font("Arial", 15F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); dgvThongTinKhachHang.Columns["TONGTIEN"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvThongTinKhachHang.Columns["NGAYDACBIET"].Visible = false; dgvThongTinKhachHang.Columns["CANCUOC_CONGDAN"].Visible = false; dgvThongTinKhachHang.Columns["SODIEM"].Visible = false; dgvThongTinKhachHang.Columns["TONGTIEN"].Visible = false; BindingList <TIMKIEM_DTO> _comboItems = new BindingList <TIMKIEM_DTO>(); _comboItems.Add(new TIMKIEM_DTO { VALUE = 0, TEXT = "Mã thẻ" }); _comboItems.Add(new TIMKIEM_DTO { VALUE = 1, TEXT = "Mã khách hàng" }); _comboItems.Add(new TIMKIEM_DTO { VALUE = 2, TEXT = "Tên khách hàng" }); _comboItems.Add(new TIMKIEM_DTO { VALUE = 3, TEXT = "Số điện thoại" }); _comboItems.Add(new TIMKIEM_DTO { VALUE = 4, TEXT = "Số chứng minh thư" }); _comboItems.Add(new TIMKIEM_DTO { VALUE = 5, TEXT = "Số điểm" }); cboDieuKienTimKiem.DataSource = _comboItems; cboDieuKienTimKiem.DisplayMember = "TEXT"; cboDieuKienTimKiem.ValueMember = "VALUE"; cboDieuKienTimKiem.SelectedIndex = 0; txtDieuKienTimKiem.Text = P_KEYSEARCH; List <KHACHHANG_DTO> _LST_KHACHHANG_DTO = new List <KHACHHANG_DTO>(); _LST_KHACHHANG_DTO = FrmThanhToanService.TIMKIEM_KHACHHANG_FROM_ORACLE(P_KEYSEARCH, 1, cboDieuKienTimKiem.SelectedIndex, Session.Session.CurrentUnitCode); BINDING_DATA_KHACHHANG_TO_GRIDVIEW(_LST_KHACHHANG_DTO); }
private void btnTimKiemKhachHang_Click(object sender, System.EventArgs e) { string P_KEYSEARCH = txtDieuKienTimKiem.Text; int P_USE_TIMKIEM_ALL = 0; int P_DIEUKIEN_TIMKIEM = cboDieuKienTimKiem.SelectedIndex; List <KHACHHANG_DTO> _LST_KHACHHANG_DTO = new List <KHACHHANG_DTO>(); _LST_KHACHHANG_DTO = FrmThanhToanService.TIMKIEM_KHACHHANG_FROM_ORACLE(P_KEYSEARCH, P_USE_TIMKIEM_ALL, P_DIEUKIEN_TIMKIEM, Session.Session.CurrentUnitCode); BINDING_DATA_KHACHHANG_TO_GRIDVIEW(_LST_KHACHHANG_DTO); }
private void txtDieuKienTimKiem_TextChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtDieuKienTimKiem.Text)) { string P_KEYSEARCH = txtDieuKienTimKiem.Text; int P_USE_TIMKIEM_ALL = 1; int P_DIEUKIEN_TIMKIEM = cboDieuKienTimKiem.SelectedIndex; List <KHACHHANG_DTO> _LST_KHACHHANG_DTO = new List <KHACHHANG_DTO>(); _LST_KHACHHANG_DTO = FrmThanhToanService.TIMKIEM_KHACHHANG_FROM_ORACLE(P_KEYSEARCH, P_USE_TIMKIEM_ALL, P_DIEUKIEN_TIMKIEM, Session.Session.CurrentUnitCode); BINDING_DATA_KHACHHANG_TO_GRIDVIEW(_LST_KHACHHANG_DTO); } }