Пример #1
0
        private void cargar_Combo()
        {
            try
            {
                cp_catalogo_Bus CatBus = new cp_catalogo_Bus();
                List <cp_TipoServicioxProvee_Info> lEstado  = new List <cp_TipoServicioxProvee_Info>();
                List <cp_catalogo_Info>            lEstado1 = new List <cp_catalogo_Info>();


                lEstado1 = CatBus.Get_List_catalogo("T_SERVI");

                foreach (var item in lEstado1)
                {
                    lEstado.Add(new cp_TipoServicioxProvee_Info(item.IdCatalogo, item.Nombre));
                }

                this.cmb_tipoServicioxProve.DataSource    = lEstado;
                this.cmb_tipoServicioxProve.DisplayMember = "descripcion";
                this.cmb_tipoServicioxProve.ValueMember   = "codigo";
            }
            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());
            }
        }
Пример #2
0
        public void cargar_Combo()
        {
            try
            {
                List <cp_catalogo_Info> catalogoInfoList = new List <cp_catalogo_Info>();
                cp_catalogo_Bus         catalogoBus      = new cp_catalogo_Bus();

                catalogoInfoList = new List <cp_catalogo_Info>();
                catalogoInfoList = catalogoBus.Get_List_catalogo(IdTipoCatalogo);

                this.cmb_TipoGasto.DataSource    = catalogoInfoList;
                this.cmb_TipoGasto.DisplayMember = "Nombre";
                this.cmb_TipoGasto.ValueMember   = "Idcatalogo";
            }
            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());
            }
        }