Ejemplo n.º 1
0
        private void cargarDepartamentos(int COD_PAIS)
        {
            BESVMC_DEPA oBeDepartamento = new BESVMC_DEPA();
            BRSVMC_DEPA oBrDepartamento = new BRSVMC_DEPA();
            List<BESVMC_DEPA> oListDepartamento = new List<BESVMC_DEPA>();
            oBeDepartamento.COD_PAIS = COD_PAIS;
            oBeDepartamento.NUM_ACCI = 5;
            oListDepartamento = oBrDepartamento.Get_SVPR_DEPA_LIST(oBeDepartamento);

            luePopCOD_DEPA.Properties.DataSource = oListDepartamento;
            luePopCOD_DEPA.Properties.Columns.Clear();
            luePopCOD_DEPA.Properties.Columns.Add(new LookUpColumnInfo("ALF_DEPA", 100, "Departamento"));
            luePopCOD_DEPA.Properties.DisplayMember = "ALF_DEPA";
            luePopCOD_DEPA.Properties.ValueMember = "COD_DEPA";
        }
Ejemplo n.º 2
0
        private void lueCOD_PAIS_EditValueChanged(object sender, EventArgs e)
        {
            LookUpEdit Obj = (LookUpEdit)sender;

            if (Obj.EditValue != null)
            {
                var oBe = new BESVMC_DEPA();
                var oBr = new BRSVMC_DEPA();

                oBe.NUM_ACCI = 5;
                oBe.COD_PAIS = Convert.ToInt32(Obj.EditValue);
                var oList = oBr.Get_SVPR_DEPA_LIST(oBe);

                lueCOD_DEPA.Properties.DataSource = oList;
                lueCOD_DEPA.Properties.Columns.Clear();
                lueCOD_DEPA.Properties.Columns.Add(new LookUpColumnInfo("ALF_DEPA", 100, "Departamento"));
                lueCOD_DEPA.Properties.DisplayMember = "ALF_DEPA";
                lueCOD_DEPA.Properties.ValueMember = "COD_DEPA";
            }
            else
            {
                lueCOD_DEPA.Properties.DataSource = null;
            }
        }