示例#1
0
 private void btnTimKiem_Click(object sender, EventArgs e)
 {
     if (txtTimKiem.Text.Trim() != "")
     {
         if (cbbTimKiem.SelectedIndex == 0)
         {
             int number = 0;
             if (int.TryParse(txtTimKiem.Text, out number))
             {
                 dgvDanhSachHoaDon.DataSource = hoadonController.SearchMaHoaDon(number);
             }
         }
         else
         {
             dgvDanhSachHoaDon.DataSource = hoadonController.SearchTenKhachHang(txtTimKiem.Text);
         }
     }
     else
     {
         dgvDanhSachHoaDon.DataSource = hoadonController.GetAllHoaDon();
     }
 }
示例#2
0
 void load()
 {
     dgvDanhSachHoaDon.DataSource = hoadonController.GetAllHoaDon();
 }