Exemple #1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            BUS.LoanBUS bus         = new BUS.LoanBUS();
            string      searchValue = txtSearch.Text;

            if (searchValue == "")
            {
                bsItem.DataSource     = bus.getAllLoans();
                dgvHistory.DataSource = bsItem;
                return;
            }

            bsItem.DataSource     = bus.getLoanByID(searchValue);
            dgvHistory.DataSource = bsItem;
        }
Exemple #2
0
 public void LoadData(int role, string UserID)
 {
     BUS.LoanBUS bus = new BUS.LoanBUS();
     if (role == 1)
     {
         bsItem.DataSource     = bus.getLoanByID(UserID);
         dgvHistory.DataSource = bsItem;
     }
     else
     {
         bsItem.DataSource     = bus.getAllLoans();
         dgvHistory.DataSource = bsItem;
     }
     bnList.BindingSource = bsItem;
 }