Exemplo n.º 1
0
 private void CargarSectores()
 {
     try
     {
         DataSet ds = new s_sector().Gets_sector();
         flowLayoutPanel1.Controls.Clear();
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             var es = new EditSector
             {
                 IdSector    = ((int)dr["id_sector"]),
                 Descripcion = ((string)dr["descripcion"]),
                 Areas       = ((string)dr["id_areas"])
             };
             flowLayoutPanel1.Controls.Add(es);
         }
     }
     catch (Exception ex)
     {
         Log.ShowAndLog(ex);
     }
 }