public void Cargar_combos() { try { string mensaje = ""; lst_GrupoCble = bus_GrupoCble.Get_list_Grupocble(); cmb_GrupoCble.DataSource = lst_GrupoCble; lst_Plancta = bus_Plancta.Get_Plancta_x_Grupo(param.IdEmpresa, ""); cmb_CtaCble.DataSource = lst_Plancta; lst_Centro_costo = bus_Centro_costo.Get_list_Centro_Costo(param.IdEmpresa); cmb_Centro_costo.DataSource = lst_Centro_costo; lst_Centro_costo_sub_centro_costo = bus_Centro_costo_sub_centro_costo.Get_list_centro_costo_sub_centro_costo(param.IdEmpresa); cmb_Centro_costo_sub_centro_costo.DataSource = lst_Centro_costo_sub_centro_costo; bei_Desde.EditValue = DateTime.Now.AddMonths(-1); bei_Hasta.EditValue = DateTime.Now; bei_GrupoCble.EditValue = "GS_OP"; foreach (var item in lst_GrupoCble) { string tipo = item.gc_GrupoCble; lst_GrupoCble_chk.Add(tipo); } cmb_GrupoCble_chk.DataSource = lst_GrupoCble_chk; lst_Centro_costo.Add(new ct_Centro_costo_Info { IdCentroCosto = "", Centro_costo = "Histórico acumulado" }); cmb_CentroCosto_chk.DataSource = lst_Centro_costo; lst_punto_cargo_grupo = bus_punto_cargo_grupo.Get_List_punto_cargo_grupo(param.IdEmpresa, ref mensaje); cmb_punto_cargo_grupo.DataSource = lst_punto_cargo_grupo; lst_nivel = bus_nivel.Get_list_Plancta_nivel(param.IdEmpresa); foreach (var item in lst_nivel) { cmb_nivel.Items.Add(item.IdNivelCta); } if (lst_nivel.Count > 0) { bei_Nivel.EditValue = lst_nivel.Max(q => q.IdNivelCta); } lst_punto_cargo = bus_punto_cargo.Get_List_PuntoCargo(param.IdEmpresa); cmb_punto_cargo.DataSource = lst_punto_cargo; } 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 void cargargrid() { try { gridNivel.DataSource = _PlanCtaNivelBus.Get_list_Plancta_nivel(Parametros.IdEmpresa); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cargar_combo() { try { listPlanCta = PlanCtaBus.Get_List_Plan_ctaPadre(param.IdEmpresa, ref MensajeError); cmb_cuenta_padre.Properties.DataSource = listPlanCta; ct_Grupocble_Bus GrupoCbteBus = new ct_Grupocble_Bus(); List <ct_Grupocble_Info> listGrupoCble = new List <ct_Grupocble_Info>(); if (cmb_grupo_cble.DataSource == null) { listGrupoCble = GrupoCbteBus.Get_list_Grupocble(); cmb_grupo_cble.DataSource = listGrupoCble; cmb_grupo_cble.ValueMember = "IdGrupoCble"; cmb_grupo_cble.DisplayMember = "gc_GrupoCble"; } if (cmb_naturaleza.DataSource == null) { List <tb_Catalogo_Info> listCat_Naturaleza = new List <Info.General.tb_Catalogo_Info>(); listCat_Naturaleza.Add(new Info.General.tb_Catalogo_Info(0, "D", "Deudora", "A", 0, 0)); listCat_Naturaleza.Add(new Info.General.tb_Catalogo_Info(0, "C", "Acreedora", "A", 0, 0)); cmb_naturaleza.DataSource = listCat_Naturaleza; cmb_naturaleza.ValueMember = "CodCatalogo"; cmb_naturaleza.DisplayMember = "ca_descripcion"; } if (cmb_nivel.DataSource == null) { ListNivelCta = BusNivel.Get_list_Plancta_nivel(param.IdEmpresa); cmb_nivel.DataSource = ListNivelCta; cmb_nivel.ValueMember = "IdNivelCta"; cmb_nivel.DisplayMember = "IdNivelCta"; } list_grupo_x_tipo_gasto = bus_grupo_x_tipo_gasto.Get_list_grupo_x_tipo_Gasto_nivel_3(param.IdEmpresa); cmb_Grupo_x_tipo_gasto.Properties.DataSource = list_grupo_x_tipo_gasto; cmb_Grupo_x_tipo_gasto.Properties.ValueMember = "IdTipo_Gasto"; cmb_Grupo_x_tipo_gasto.Properties.DisplayMember = "nom_tipo_Gasto"; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void frmCon_PlanCuenta_Niveles_Mant_Load(object sender, EventArgs e) { try { listaPlanCtaNivel = _PlanCtaNivel_bus.Get_list_Plancta_nivel(param.IdEmpresa); switch (_Accion) { case Cl_Enumeradores.eTipo_action.grabar: ucGe_Menu.Visible_bntAnular = false; chk_estado.Checked = true; chk_estado.Enabled = false; break; case Cl_Enumeradores.eTipo_action.actualizar: this.txt_id.Enabled = false; ucGe_Menu.Visible_bntAnular = false; break; case Cl_Enumeradores.eTipo_action.Anular: this.txt_id.Enabled = false; this.num_dig.Enabled = false; this.txt_descripcion.Enabled = false; ucGe_Menu.Visible_bntGuardar_y_Salir = false; ucGe_Menu.Visible_btnGuardar = false; break; case Cl_Enumeradores.eTipo_action.consultar: this.txt_id.Enabled = false; this.num_dig.Enabled = false; this.txt_descripcion.Enabled = false; ucGe_Menu.Visible_bntAnular = false; ucGe_Menu.Visible_bntGuardar_y_Salir = false; ucGe_Menu.Visible_btnGuardar = false; break; default: break; } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void carga_combos() { try { string msg = ""; uCct_Pto_Cargo_Grupo.Cargar_combos(); ct_Plancta_nivel_Bus BusNivel = new ct_Plancta_nivel_Bus(); List <ct_Plancta_nivel_Info> listNiveles = new List <ct_Plancta_nivel_Info>(); listPeriodo = busPeriodo.Get_List_PeriodoCombo(param.IdEmpresa, ref msg); cmb_Periodo.Properties.DataSource = listPeriodo; cmb_Periodo.Properties.ValueMember = "IdPeriodo"; cmb_Periodo.Properties.DisplayMember = "nom_periodo"; listNiveles = BusNivel.Get_list_Plancta_nivel(param.IdEmpresa); cmb_nivel.DisplayMember = "IdNivelCta"; cmb_nivel.ValueMember = "IdNivelCta"; cmb_nivel.DataSource = listNiveles; cmb_nivel.SelectedValue = 3; ct_Centro_costo_Bus BusCentro = new ct_Centro_costo_Bus(); List <ct_Centro_costo_Info> listCentro = new List <ct_Centro_costo_Info>(); listCentro = BusCentro.Get_list_Centro_Costo_cuentas_de_movimiento(param.IdEmpresa, ref msg); cmb_centro_costo.Properties.DisplayMember = "Centro_costo"; cmb_centro_costo.Properties.ValueMember = "IdCentroCosto"; cmb_centro_costo.Properties.DataSource = listCentro; cmb_Mostrar_a.SelectedItem = "Mes actual"; cmb_nivel.SelectedIndex = 5; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cargar_combos() { try { ct_Periodo_Bus BusPeriodo = new ct_Periodo_Bus(); List <ct_Periodo_Info> ListPeriodo = new List <ct_Periodo_Info>(); int anio_actual = DateTime.Now.Year; ListPeriodo = BusPeriodo.Get_List_Periodo(param.IdEmpresa, ref MensajeError); foreach (var itemPeriodo in ListPeriodo) { if (anio_actual == itemPeriodo.IdanioFiscal) { chkList_Periodos.Items.Add(itemPeriodo, itemPeriodo.nom_periodo, CheckState.Checked, true); } else { chkList_Periodos.Items.Add(itemPeriodo, itemPeriodo.nom_periodo, CheckState.Unchecked, true); } } ct_Plancta_nivel_Bus BusNivel = new ct_Plancta_nivel_Bus(); List <ct_Plancta_nivel_Info> listNivel = new List <ct_Plancta_nivel_Info>(); listNivel = BusNivel.Get_list_Plancta_nivel(param.IdEmpresa); cmb_nivel.DataSource = listNivel; cmb_nivel.DisplayMember = "IdNivelCta"; cmb_nivel.ValueMember = "IdNivelCta"; cmb_nivel.SelectedValue = 5; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }