Exemplo n.º 1
0
 /// <summary>
 /// REALIZAR OPERACIONES DE MANTENIMIENTO
 /// </summary>
 /// <param name="oBe"></param>
 public void Set_SVPR_MONE(BESVMC_MONE oBe)
 {
     try
     {
         oDa.Set_SVPR_MONE(oBe);
         Dispose(false);
     }
     catch(Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Exemplo n.º 2
0
        private void xfCurrencySelector_Load(object sender, EventArgs e)
        {
            var oBeMo = new BESVMC_MONE();
            var oBrMo = new BRSVMC_MONE();

            oBeMo.NUM_ACCI = 4;
            oBeMo.COD_COMP = SESSION_COMP;
            var oListMo = oBrMo.Get_SVPR_MONE_LIST(oBeMo);

            lueCOD_MONE.Properties.DataSource = oListMo;
            lueCOD_MONE.Properties.Columns.Clear();
            lueCOD_MONE.Properties.Columns.Add(new LookUpColumnInfo("ALF_MONE", 100, "Moneda"));
            lueCOD_MONE.Properties.DisplayMember = "ALF_MONE";
            lueCOD_MONE.Properties.ValueMember = "COD_MONE";
        }
Exemplo n.º 3
0
 /// <summary>
 /// OBTENER EL RESULTADO DE CUALQUIER CONSULTA
 /// </summary>
 /// <param name="oBe"></param>
 /// <returns></returns>
 public List<BESVMC_MONE> Get_SVPR_MONE_LIST(BESVMC_MONE oBe)
 {
     try
     {
         using (IDataReader oDr = oDa.Get_SVPR_MONE_LIST(oBe))
         {
             List<BESVMC_MONE> oList = new List<BESVMC_MONE>();
             IList iList = oList;
             ((IList)iList).LoadFromReader<BESVMC_MONE>(oDr);
             Dispose(false);
             return (oList);
         }
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// EVENTO LOAD DEL FORMULARIO
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xfSalesCreditNote_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;
            SESSION_IMPU = ((xfMain)MdiParent).SESSION_IMPU;
            SESSION_PORC_IMPU = ((xfMain)MdiParent).SESSION_PORC_IMPU;
            lblALF_IMPU.Text = SESSION_IMPU;

            var obral = new BRWarehouse();
            var olsal = obral.Get_PSGN_SPLS_SVMC_ALMA(SESSION_COMP);

            lueCOD_ALMA.Properties.DataSource = olsal;
            lueCOD_ALMA.Properties.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_ALMA", "Almacén", 20);
            lueCOD_ALMA.Properties.Columns.Add(lkci);
            lueCOD_ALMA.Properties.DisplayMember = "ALF_ALMA";
            lueCOD_ALMA.Properties.ValueMember = "COD_ALMA";
            //MONEDAS
            var oBeMo = new BESVMC_MONE();
            var oBrMo = new BRSVMC_MONE();

            oBeMo.NUM_ACCI = 4;
            oBeMo.COD_COMP = SESSION_COMP;
            var oListMo = oBrMo.Get_SVPR_MONE_LIST(oBeMo);

            lueCOD_MONE.Properties.DataSource = oListMo;
            lueCOD_MONE.Properties.Columns.Clear();
            lueCOD_MONE.Properties.Columns.Add(new LookUpColumnInfo("ALF_MONE", 100, "Moneda"));
            lueCOD_MONE.Properties.DisplayMember = "ALF_MONE";
            lueCOD_MONE.Properties.ValueMember = "COD_MONE";

            gdcArticles.DataSource = oListArti;
            gdcArticlesCompleted.DataSource = oListArtiCompleted;
            gdcArticlesGroup.DataSource = oListArtiGroup;
            gdcGroups.DataSource = oListGroup;

            StateControl(true);
        }
Exemplo n.º 5
0
        public List<BESVMC_MONE> Get_SVPR_MONE(BESVMC_MONE oBe)
        {
            if (HttpContext.Current.Session["COD_COMP"] == null)
                return new List<BESVMC_MONE>();

            var oBr = new BRSVMC_MONE();

            oBe.COD_COMP = (int)HttpContext.Current.Session["COD_COMP"];
            var oList = oBr.Get_SVPR_MONE_LIST(oBe);

            return oList;
        }
Exemplo n.º 6
0
 public void Set_SVPR_MONE(BESVMC_MONE oBe)
 {
     if (ocn.State == ConnectionState.Closed) ocn.Open();
     using (var obts = ocn.BeginTransaction())
     {
         try
         {
             using (var ocmd = odb.GetStoredProcCommand("SVPR_MONE",
                                                                 oBe.COD_MONE,
                                                                 oBe.COD_COMP,
                                                                 oBe.ALF_MONE,
                                                                 oBe.ALF_MONE_SIMB,
                                                                 oBe.COD_USUA_CREA,
                                                                 oBe.COD_USUA_MODI,
                                                                 oBe.NUM_ACCI))
             {
                 ocmd.CommandTimeout = 2000;
                 odb.ExecuteNonQuery(ocmd, obts);
                 oBe.COD_MONE = Convert.ToInt32(odb.GetParameterValue(ocmd, "@COD_MONE"));
                 obts.Commit();
             }
         }
         catch (Exception ex)
         {
             obts.Rollback();
             throw new ArgumentException(ex.Message);
         }
         finally
         {
             ocn.Close();
         }
     }
 }
Exemplo n.º 7
0
 public IDataReader Get_SVPR_MONE_LIST(BESVMC_MONE oBe)
 {
     try
     {
         if (ocn.State == ConnectionState.Closed) ocn.Open();
         var ocmd = odb.GetStoredProcCommand("SVPR_MONE_LIST",
                                                             oBe.COD_MONE,
                                                             oBe.COD_COMP,
                                                             oBe.ALF_MONE,
                                                             oBe.ALF_MONE_SIMB,
                                                             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();
     }
 }
Exemplo n.º 8
0
        private void xfQuote_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;
            SESSION_IMPU = ((xfMain)MdiParent).SESSION_IMPU;
            SESSION_PORC_IMPU = ((xfMain)MdiParent).SESSION_PORC_IMPU;
            lblALF_IMPU.Text = SESSION_IMPU;

            //MONEDAS
            var oBeMo = new BESVMC_MONE();
            var oBrMo = new BRSVMC_MONE();

            oBeMo.NUM_ACCI = 4;
            oBeMo.COD_COMP = SESSION_COMP;
            var oListMo = oBrMo.Get_SVPR_MONE_LIST(oBeMo);

            lueCOD_MONE.Properties.DataSource = oListMo;
            lueCOD_MONE.Properties.Columns.Clear();
            lueCOD_MONE.Properties.Columns.Add(new LookUpColumnInfo("ALF_MONE", 100, "Moneda"));
            lueCOD_MONE.Properties.DisplayMember = "ALF_MONE";
            lueCOD_MONE.Properties.ValueMember = "COD_MONE";
            //PROYECTOS
            var oBePr = new BESVMC_PROY();
            var oBrPr = new BRSVMC_PROY();

            oBePr.NUM_ACCI = 5;
            oBePr.COD_COMP = SESSION_COMP;
            var oListPr = oBrPr.Get_SVPR_PROY_LIST(oBePr);

            lueCOD_PROY.Properties.DataSource = oListPr;
            lueCOD_PROY.Properties.Columns.Clear();
            lueCOD_PROY.Properties.Columns.Add(new LookUpColumnInfo("ALF_PROY", 100, "Proyecto"));
            lueCOD_PROY.Properties.DisplayMember = "ALF_PROY";
            lueCOD_PROY.Properties.ValueMember = "COD_PROY";
            //MOTIVOS
            var oBeM = new BEReason();
            oBeM.COD_COMP = SESSION_COMP;
            oBeM.COD_TIPO_MOTI = 2;
            oBeM.NUM_ACCI = 4;
            var obrmo = new BRSVMC_MOTI();
            var olsmo = obrmo.Get_SVPR_MOTI_LIST(oBeM);
            lkeCOD_MOTI.Properties.DataSource = olsmo;
            lkeCOD_MOTI.Properties.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_MOTI", "Motivo", 20);
            lkeCOD_MOTI.Properties.Columns.Add(lkci);
            lkeCOD_MOTI.Properties.DisplayMember = "ALF_MOTI";
            lkeCOD_MOTI.Properties.ValueMember = "COD_MOTI";
            //EJECUTIVO COMERCIAL
            var oBeE = new BESVMC_SOCI_NEGO();
            var oBrE = new BRSVMC_SOCI_NEGO();

            oBeE.NUM_ACCI = 5;
            oBeE.COD_COMP = SESSION_COMP;
            var oListE = oBrE.Get_SVPR_SOCI_NEGO_LIST(oBeE);

            lueCOD_EJEC_COME.Properties.DataSource = oListE;
            lueCOD_EJEC_COME.Properties.Columns.Clear();
            lueCOD_EJEC_COME.Properties.Columns.Add(new LookUpColumnInfo("ALF_NOMB", 100, "Ejecutivo comercial"));
            lueCOD_EJEC_COME.Properties.DisplayMember = "ALF_NOMB";
            lueCOD_EJEC_COME.Properties.ValueMember = "COD_SOCI_NEGO";

            gdcArticles.DataSource = oListArti;
            gdcArticlesGroup.DataSource = oListArtiGroup;
            gdcGroups.DataSource = oListGroup;

            StateControl(true);
        }
        private void xfSalesCreditNoteFactoring_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;
            SESSION_IMPU = ((xfMain)MdiParent).SESSION_IMPU;
            SESSION_PORC_IMPU = ((xfMain)MdiParent).SESSION_PORC_IMPU;
            lblALF_IMPU.Text = SESSION_IMPU;
            StateControl(true);
            //MONEDAS
            var oBeMo = new BESVMC_MONE();
            var oBrMo = new BRSVMC_MONE();

            oBeMo.NUM_ACCI = 4;
            oBeMo.COD_COMP = SESSION_COMP;
            var oListMo = oBrMo.Get_SVPR_MONE_LIST(oBeMo);
            gdcInvoices.DataSource = oListInvoice;

            lueCOD_MONE.Properties.DataSource = oListMo;
            lueCOD_MONE.Properties.Columns.Clear();
            lueCOD_MONE.Properties.Columns.Add(new LookUpColumnInfo("ALF_MONE", 100, "Moneda"));
            lueCOD_MONE.Properties.DisplayMember = "ALF_MONE";
            lueCOD_MONE.Properties.ValueMember = "COD_MONE";
        }