private void BuscarVersiones() { try { //Buscardatosdelegajo if (TB_Codigo.Text == "" || TB_VersionLegajo.Text == "" || TB_FechaIng.Text == "") { return; } LV = LV.BuscarUnaVersion(TB_Codigo.Text, TB_VersionLegajo.Text, TB_FechaIng.Text); if (LV.Codigo == 0) { throw new Exception("No se encontro registro con los datos ingresados."); } //Cargo los datos CargarDatosABM(); CargarDatosPefil(); CargarTemas(LV.Temas); BuscarCantVersiones(); } catch (Exception err) { MessageBox.Show(err.Message, "Error"); } }
private void TB_Codigo_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { if (TB_Codigo.Text == "") { return; } txtVersionActual.Text = _TraerVersionActual(); //Buscardatosdelegajo if (TB_VersionLegajo.Text == "" || TB_FechaIng.Text == "") { return; } LV = LV.BuscarUnaVersion(TB_Codigo.Text, TB_VersionLegajo.Text, TB_FechaIng.Text); if (LV.Codigo == 0) { throw new Exception("No se encontro registro con los datos ingresados."); } //Cargo los datos CargarDatosABM(); CargarDatosPefil(); CargarTemas(LV.Temas); } } catch (Exception err) { MessageBox.Show(err.Message, "Error"); } }