private void btnSearchSupplier_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txtSearchValue.Text.Trim()))
     {
         return;
     }
     try
     {
         if ((comboBoxSearchOptions.SelectedItem as dynamic).Value == "ID")
         {
             int id;
             if (Int32.TryParse(txtSearchValue.Text, out id))
             {
                 supplierBindingSource.DataSource = bus.SearchSupplierByID(id);
             }
             else
             {
                 MessageBox.Show("Invalid search value", "Error"
                                 , MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
         else if ((comboBoxSearchOptions.SelectedItem as dynamic).Value == "Name")
         {
             supplierBindingSource.DataSource = bus.SearchSupplierByName(txtSearchValue.Text.Trim());
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }