Example #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";
        }
Example #2
0
 /// <summary>
 /// OBTENER EL RESULTADO DE CUALQUIER CONSULTA
 /// </summary>
 /// <param name="oBe"></param>
 /// <returns></returns>
 public List<BESVMC_DEPA> Get_SVPR_DEPA_LIST(BESVMC_DEPA oBe)
 {
     try
     {
         using (IDataReader oDr = oDa.Get_SVPR_DEPA_LIST(oBe))
         {
             List<BESVMC_DEPA> oList = new List<BESVMC_DEPA>();
             IList iList = oList;
             ((IList)iList).LoadFromReader<BESVMC_DEPA>(oDr);
             Dispose(false);
             return (oList);
         }
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Example #3
0
 public IDataReader Get_SVPR_DEPA_LIST(BESVMC_DEPA oBe)
 {
     try
     {
         if (ocn.State == ConnectionState.Closed) ocn.Open();
         var ocmd = odb.GetStoredProcCommand("SVPR_DEPA_LIST",
                                             oBe.COD_PAIS,
                                             oBe.COD_DEPA,
                                             oBe.ALF_DEPA,
                                             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();
     }
 }
Example #4
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;
            }
        }