public List <tb_Mes_info> Get_List_Mes() { try { List <tb_Mes_info> lm = new List <tb_Mes_info>(); EntitiesGeneral Otabla = new EntitiesGeneral(); var selectmes = from A in Otabla.tb_mes select A; foreach (var item in selectmes) { tb_Mes_info mes_info = new tb_Mes_info(); mes_info.idMes = item.idMes; mes_info.smes = item.smes; mes_info.nemonico = item.Nemonico; lm.Add(mes_info); } return(lm); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); mensaje = ex.ToString() + " " + ex.Message; throw new Exception(ex.ToString()); } }
private void cmbmes_SelectedIndexChanged(object sender, EventArgs e) { try { _mesI = (tb_Mes_info)cmbmes.SelectedItem; this.Event_cmbmes_SelectedIndexChanged(sender, e); } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }
public int get_idMes() { try { int IdMes = 0; _mesI = (tb_Mes_info)cmbmes.SelectedItem; if (_mesI != null) { IdMes = _mesI.idMes; } return(IdMes); } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); return(0); } }