Example #1
0
 private void Search_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(txtCodeFind.Text))
     {
         var nro = int.Parse(txtCodeFind.Text);
         lboxCases.DataSource = ListCases.Where(x => x.Code == nro).ToList();
     }
     else
     {
         InitialLoad();
         ChargeList();
     }
 }
Example #2
0
 private void txtCodeFind_KeyPress(object sender, KeyPressEventArgs e)
 {
     General.ValidNumber(e);
     if (!string.IsNullOrWhiteSpace(txtCodeFind.Text))
     {
         var nro = int.Parse(txtCodeFind.Text);
         lboxCases.DataSource = ListCases.Where(x => x.Code == nro).ToList();
     }
     else
     {
         InitialLoad();
         ChargeList();
     }
 }
Example #3
0
        private void lbxCompany_SelectedIndexChanged(object sender, EventArgs e)
        {
            var filterCases = ListCases.Where(x => x.IdCompany == ((Company)lbxCompany.SelectedItem).Id).ToList();

            FillListBox(lboxCases, filterCases, "Id", "code");
        }