示例#1
0
        /// <summary>
        /// CARGAR LOS DISTRITOS EN FUNCION A LA PROVINCIA QUE ESTA SELECCIONADA
        /// </summary>
        /// <param name="COD_PROV"></param>
        /// <param name="COD_DEPA"></param>
        /// <param name="selector"></param>
        private void cargarDistritos(string COD_PROV, string COD_DEPA)
        {
            BESVMC_DIST oBeDistritoOrigen = new BESVMC_DIST();
            BRSVMC_DIST oBrDistritoOrigen = new BRSVMC_DIST();
            List<BESVMC_DIST> oListDistritoOrigen = new List<BESVMC_DIST>();
            oBeDistritoOrigen.COD_PROV = COD_PROV;
            oBeDistritoOrigen.COD_DEPA = COD_DEPA;
            oBeDistritoOrigen.NUM_ACCI = 5;
            oListDistritoOrigen = oBrDistritoOrigen.Get_SVPR_DIST_LIST(oBeDistritoOrigen);

            luePopCOD_DIST.Properties.DataSource = oListDistritoOrigen;
            luePopCOD_DIST.Properties.Columns.Clear();
            luePopCOD_DIST.Properties.Columns.Add(new LookUpColumnInfo("ALF_DIST", 100, "Distrito"));
            luePopCOD_DIST.Properties.DisplayMember = "ALF_DIST";
            luePopCOD_DIST.Properties.ValueMember = "COD_DIST";
        }
示例#2
0
        private void lueCOD_PROV_EditValueChanged(object sender, EventArgs e)
        {
            LookUpEdit Obj = (LookUpEdit)sender;

            if (Obj.EditValue != null)
            {
                var oBe = new BESVMC_DIST();
                var oBr = new BRSVMC_DIST();

                oBe.NUM_ACCI = 5;
                oBe.COD_DEPA = Convert.ToString(lueCOD_DEPA.EditValue);
                oBe.COD_PROV = Convert.ToString(lueCOD_PROV.EditValue);
                var oList = oBr.Get_SVPR_DIST_LIST(oBe);

                lueCOD_DIST.Properties.DataSource = oList;
                lueCOD_DIST.Properties.Columns.Clear();
                lueCOD_DIST.Properties.Columns.Add(new LookUpColumnInfo("ALF_DIST", 100, "Distrito"));
                lueCOD_DIST.Properties.DisplayMember = "ALF_DIST";
                lueCOD_DIST.Properties.ValueMember = "COD_DIST";
            }
            else
            {
                lueCOD_DIST.Properties.DataSource = null;
            }
        }