Пример #1
0
 /// <summary>
 /// OBTENER EL RESULTADO DE CUALQUIER CONSULTA
 /// </summary>
 /// <param name="oBe"></param>
 /// <returns></returns>
 public List<BESVMD_ACCE> Get_SVPR_ACCE_LIST(BESVMD_ACCE oBe)
 {
     try
     {
         using (IDataReader oDr = oDa.Get_SVPR_ACCE_LIST(oBe))
         {
             List<BESVMD_ACCE> oList = new List<BESVMD_ACCE>();
             IList iList = oList;
             ((IList)iList).LoadFromReader<BESVMD_ACCE>(oDr);
             Dispose(false);
             return (oList);
         }
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Пример #2
0
 public IDataReader Get_SVPR_ACCE_LIST(BESVMD_ACCE oBe)
 {
     try
     {
         if (ocn.State == ConnectionState.Closed) ocn.Open();
         var ocmd = odb.GetStoredProcCommand("SVPR_ACCE_LIST",
                                             oBe.COD_MAIN,
                                             oBe.COD_PERF,
                                             oBe.ALF_NOMB,
                                             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();
     }
 }
Пример #3
0
        /// <summary>
        /// AL DESACTIVAR EL FORMULARIO
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xfSalesCreditNote_Deactivate(object sender, EventArgs e)
        {
            var oBeAcce = new BESVMD_ACCE();
            var oBrAcce = new BRSVMD_ACCE();
            oBeAcce.NUM_ACCI = 5;
            oBeAcce.ALF_NOMB = FORM_SUBO;
            oBeAcce.COD_PERF = SESSION_PERF;
            var oListBotones = oBrAcce.Get_SVPR_ACCE_LIST(oBeAcce);

            foreach (BarButtonItemLink itemLink in ((xfMain)MdiParent).barTool.ItemLinks)
            {
                itemLink.Item.Visibility = BarItemVisibility.Never;
            }
        }
Пример #4
0
        /// <summary>
        /// AL ACTIVAR EL FORMULARIO
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xfSalesCreditNote_Activated(object sender, EventArgs e)
        {
            ((xfMain)MdiParent).fra = this;

            var oBeAcce = new BESVMD_ACCE();
            var oBrAcce = new BRSVMD_ACCE();
            oBeAcce.NUM_ACCI = 5;
            oBeAcce.ALF_NOMB = FORM_SUBO;
            oBeAcce.COD_PERF = SESSION_PERF;
            var oListBotones = oBrAcce.Get_SVPR_ACCE_LIST(oBeAcce);

            foreach (BarButtonItemLink itemLink in ((xfMain)MdiParent).barTool.ItemLinks)
            {
                if (oListBotones.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                    itemLink.Item.Visibility = BarItemVisibility.Always;
                else
                    itemLink.Item.Visibility = BarItemVisibility.Never;
            }
        }
Пример #5
0
 private void xfCustomerSales_Deactivate(object sender, EventArgs e)
 {
     var oBeAcce = new BESVMD_ACCE();
     oBeAcce.NUM_ACCI = 5;
     oBeAcce.ALF_NOMB = FORM_SUBO;
     oBeAcce.COD_PERF = SESSION_PERF;
     foreach (BarButtonItemLink itemLink in ((xfMain)MdiParent).barTool.ItemLinks)
     {
         itemLink.Item.Visibility = BarItemVisibility.Never;
     }
 }
Пример #6
0
        private void xfMain_Load(object sender, EventArgs e)
        {
            barMenu.Visible = false;
            barTool.Visible = false;
            barStatus.Visible = false;

            var oForm = new xfLogin();

            DialogResult oResult = oForm.ShowDialog();

            if (oResult == DialogResult.OK)
            {
                barTool.Visible = true;
                barMenu.Visible = true;
                barStatus.Visible = true;

                beiUser.Caption = oForm.oBe.ALF_NOMB;
                SESSION_USER = oForm.oBe.COD_USUA;
                SESSION_PERF = oForm.oBe.COD_PERF;
                SESSION_COMP = oForm.oBe.COD_COMP;
                SESSION_IMPU = oForm.oBe.ALF_IMPU;
                SESSION_PORC_IMPU = oForm.oBe.NUM_PORC_IMPU;

                SgIns.SESSION_USER = oForm.oBe.COD_USUA;
                SgIns.SESSION_PERF = oForm.oBe.COD_PERF;
                SgIns.SESSION_COMP = oForm.oBe.COD_COMP;
                SgIns.SESSION_IMPU = oForm.oBe.ALF_IMPU;
                SgIns.SESSION_PORC_IMPU = oForm.oBe.NUM_PORC_IMPU;

                var oBeTC = new BESVMC_TIPO_CAMB();
                var oBrTC = new BRSVMC_TIPO_CAMB();

                oBeTC.COD_COMP = SESSION_COMP;
                oBeTC.NUM_ACCI = 5;
                var oListTC = oBrTC.Get_SVPR_TIPO_CAMB_LIST(oBeTC);
                SESSION_NUM_TIPO_CAMB_COMP = (oListTC.Count == 0) ? 1 : oListTC[0].NUM_TIPO_CAMB_COMP;

                var oBe = new BESVMD_ACCE();
                var oBr = new BRSVMD_ACCE();

                oBe.NUM_ACCI = 4;
                oBe.COD_PERF = SESSION_PERF;

                var oListOpti = oBr.Get_SVPR_ACCE_LIST(oBe);

                foreach (BarItemLink itemLink in bsiManagement.ItemLinks)
                {
                    if (oListOpti.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                        itemLink.Item.Enabled = true;
                    else
                        itemLink.Item.Enabled = false;
                }
                foreach (BarItemLink itemLink in bsiSales.ItemLinks)
                {
                    if (oListOpti.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                        itemLink.Item.Enabled = true;
                    else
                        itemLink.Item.Enabled = false;
                }
                foreach (BarItemLink itemLink in bsiShopping.ItemLinks)
                {
                    if (oListOpti.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                        itemLink.Item.Enabled = true;
                    else
                        itemLink.Item.Enabled = false;
                }
                foreach (BarItemLink itemLink in bsiWarehouse.ItemLinks)
                {
                    if (oListOpti.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                        itemLink.Item.Enabled = true;
                    else
                        itemLink.Item.Enabled = false;
                }
                foreach (BarItemLink itemLink in bsiQueryReports.ItemLinks)
                {
                    if (oListOpti.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                        itemLink.Item.Enabled = true;
                    else
                        itemLink.Item.Enabled = false;
                }
                foreach (BarItemLink itemLink in bsiGenerics.ItemLinks)
                {
                    if (oListOpti.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                        itemLink.Item.Enabled = true;
                    else
                        itemLink.Item.Enabled = false;
                }
                foreach (BarItemLink itemLink in bsiSecurity.ItemLinks)
                {
                    if (oListOpti.Count(obj => obj.ALF_NOMB.Equals(itemLink.Item.Name)) > 0)
                        itemLink.Item.Enabled = true;
                    else
                        itemLink.Item.Enabled = false;
                }
                foreach (BarButtonItemLink itemLink in barTool.ItemLinks)
                {
                    itemLink.Item.Visibility = BarItemVisibility.Never;
                }
            }
            else
            {
                Application.ExitThread();
                Application.Exit();
            }
        }
Пример #7
0
 public BESVMC_PERF()
 {
     OBJ_ACCE = new BESVMD_ACCE();
 }