Esempio n. 1
0
 public void CargarGrilla(int id_tambo)
 {
     try
     {
         Tambo_Negocio tamboNegocio = new Tambo_Negocio();
         this.dgvTambos.AutoGenerateColumns = false;
         this.dgvTambos.DataSource          = tamboNegocio.RecuperarOtrosTambos(id_tambo, id_usuario);
         if (this.dgvTambos.Rows.Count != 0 && this.dgvTambos.Rows != null)
         {
             this.btnEditar.Enabled   = true;
             this.btnEliminar.Enabled = true;
         }
         else
         {
             this.btnEditar.Enabled   = false;
             this.btnEliminar.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ocurrió un error", MessageBoxButtons.OK);
     }
 }