コード例 #1
0
 private void btnBuscaAula_Click(object sender, EventArgs e)
 {
     CargarBusqueda();
     if (LocalData.searchAulasList != null &&
         LocalData.searchAulasList.Count > 0)
     {
         var searchTable = LocalData.searchAulasList.AsDataTable(); // transforma en dataTable
         var searchForm  = new Search(searchTable, "Descripcion", "Key");
         searchForm.ShowDialog();
         if (searchForm.SelectedKey != null)
         {
             var curKey = Convert.ToInt32(searchForm.SelectedKey);
             var aul    = commB.FindAulaById(curKey);
             if (aul != null)
             {
                 txtIdAula.Text = aul.IdAula.ToString();
                 txtAula.Text   = aul.Descripcion;
             }
         }
     }
 }