コード例 #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
ファイル: BRSVMC_DIST.cs プロジェクト: isvelarder/sispeper
 /// <summary>
 /// OBTENER EL RESULTADO DE CUALQUIER CONSULTA
 /// </summary>
 /// <param name="oBe"></param>
 /// <returns></returns>
 public List<BESVMC_DIST> Get_SVPR_DIST_LIST(BESVMC_DIST oBe)
 {
     try
     {
         using (IDataReader oDr = oDa.Get_SVPR_DIST_LIST(oBe))
         {
             List<BESVMC_DIST> oList = new List<BESVMC_DIST>();
             IList iList = oList;
             ((IList)iList).LoadFromReader<BESVMC_DIST>(oDr);
             Dispose(false);
             return (oList);
         }
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
コード例 #3
0
ファイル: DAUbigeo.cs プロジェクト: isvelarder/sispeperweb
 public IDataReader Get_SVPR_DIST_LIST(BESVMC_DIST oBe)
 {
     try
     {
         if (ocn.State == ConnectionState.Closed) ocn.Open();
         var ocmd = odb.GetStoredProcCommand("SVPR_DIST_LIST",
                                             oBe.COD_DEPA,
                                             oBe.COD_PROV,
                                             oBe.COD_DIST,
                                             oBe.ALF_DIST,
                                             oBe.COD_USUA_CREA,
                                             oBe.COD_USUA_MODI,
                                             oBe.NUM_ACCI
                                         );
         ocmd.CommandTimeout = 2000;
         var odr = odb.ExecuteReader(ocmd);
         Dispose(false);
         return (odr);
     }
     finally
     {
         ocn.Close();
     }
 }
コード例 #4
0
ファイル: xfCompany.cs プロジェクト: isvelarder/sispeper
        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;
            }
        }