Example #1
0
 public Contacto()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
 }
Example #2
0
 public MonedaCore()
 {
     this._DALMonedaEmpresa = new MonedaEmpresaDAL();
     this._DALMoneda        = new MonedaDAL();
     this._moneda           = new MonedaEntidad();
     this._monedaEmpresa    = new MonedaEmpresaEntidad();
 }
 public ListaDeDeseos()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     _coreMoneda = new MonedaCore();
     moneda      = new MonedaEntidad();
 }
 public RegistroCliente()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
 }
Example #5
0
 public QuienesSomos()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
 }
Example #6
0
 public UltimosPedidos()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
 }
Example #7
0
 public Tarjetas()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
 }
 public DatosPersonales()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
 }
 public PedidosConfirmacion()
 {
     idioma      = new LenguajeEntidad();
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
 }
Example #10
0
 public Catalogo()
 {
     _manager    = new ProductoCore();
     moneda      = new MonedaEntidad();
     _coremoneda = new MonedaCore();
     cotizacion  = new MonedaEmpresaEntidad();
 }
Example #11
0
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}

        protected void Page_Load(object sender, EventArgs e)
        {
            idioma = new LenguajeEntidad();

            EmpresaCore EmpresaBLL = new EmpresaCore();

            if (!IsPostBack)
            {
                idioma = (LenguajeEntidad)Session["Idioma"];

                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
            }
            else
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }

            nombreempresa.InnerHtml = EmpresaBLL.EmpresaSelectByCuit(ConfigSection.Default.Site.Cuit).NombreEmpresa;

            quienessomos.InnerHtml = EmpresaBLL.SeleccionarContenidoEmpresa(ConfigSection.Default.Site.Cuit, "QuienesSomos", 1).Valor;

            mision.InnerHtml = EmpresaBLL.SeleccionarContenidoEmpresa(ConfigSection.Default.Site.Cuit, "Mision", 1).Valor;

            vision.InnerHtml = EmpresaBLL.SeleccionarContenidoEmpresa(ConfigSection.Default.Site.Cuit, "Vision", 1).Valor;

            TelEmpresa.InnerHtml = EmpresaBLL.SeleccionarContenidoEmpresa(ConfigSection.Default.Site.Cuit, "TelEmpresa", 1).Valor;

            MailEmpresa.InnerHtml = EmpresaBLL.SeleccionarContenidoEmpresa(ConfigSection.Default.Site.Cuit, "MailEmpresa", 1).Valor;
        }
Example #12
0
 public Producto()
 {
     cotizacion  = new MonedaEmpresaEntidad();
     moneda      = new MonedaEntidad();
     _coreMoneda = new MonedaCore();
     _manager    = new ProductoCore();
     idioma      = new LenguajeEntidad();
 }
 public PedidosDireccion()
 {
     idioma          = new LenguajeEntidad();
     _usuarioManager = new UsuarioCore();
     cotizacion      = new MonedaEmpresaEntidad();
     moneda          = new MonedaEntidad();
     _coreMoneda     = new MonedaCore();
 }
Example #14
0
 public PedidosEnvio()
 {
     idioma        = new LenguajeEntidad();
     _sucursalCore = new SucursalCore();
     cotizacion    = new MonedaEmpresaEntidad();
     moneda        = new MonedaEntidad();
     _coreMoneda   = new MonedaCore();
 }
Example #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            idioma = new LenguajeEntidad();

            usuarioentidad = (UsuarioEntidad)Session["Usuario"];

            if (usuarioentidad == null)
            {
                Response.Redirect("/Areas/Public/Forms/Home.aspx");
            }
            if (!IsPostBack)
            {
                idioma = (LenguajeEntidad)Session["Idioma"];

                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
            }
            else
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }

            CargarGrillaTarjetas();

            if (!IsPostBack)
            {
                CargarDropdownTipoTarjeta();
            }
        }
Example #16
0
 public Pedidos()
 {
     idioma        = new LenguajeEntidad();
     cotizacion    = new MonedaEmpresaEntidad();
     moneda        = new MonedaEntidad();
     _coreMoneda   = new MonedaCore();
     _coreProducto = new ProductoCore();
     _coreStock    = new StockCore();
 }
Example #17
0
        /// <summary>
        /// Saves a record to the Moneda table.
        /// </summary>
        public void Insert(MonedaEntidad moneda)
        {
            ValidationUtility.ValidateArgument("moneda", moneda);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@Nombre", moneda.Nombre),
                new SqlParameter("@Cotizacion", moneda.Cotizacion)
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "MonedaInsert", parameters);
        }
Example #18
0
        public List <MonedaEntidad> FinAllMonedasByEmpresa()
        {
            var listaMonedasAMostrar = new List <MonedaEntidad>();
            var monedasDeLaEmpresa   = _DALMonedaEmpresa.SelectAllByCUIT(Helpers.ConfigSection.Default.Site.Cuit);

            foreach (var moneda in monedasDeLaEmpresa)
            {
                MonedaEntidad unaMoneda = _DALMoneda.Select(moneda.IdMoneda);
                listaMonedasAMostrar.Add(unaMoneda);
            }

            return(listaMonedasAMostrar);
        }
Example #19
0
        /// <summary>
        /// Updates a record in the Moneda table.
        /// </summary>
        public void Update(MonedaEntidad moneda)
        {
            ValidationUtility.ValidateArgument("moneda", moneda);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdMoneda", moneda.IdMoneda),
                new SqlParameter("@Nombre", moneda.Nombre),
                new SqlParameter("@SimboloMoneda", moneda.SimboloMoneda)
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "MonedaUpdate", parameters);
        }
Example #20
0
        /// <summary>
        /// Selects a single record from the Moneda table.
        /// </summary>
        public MonedaEntidad Select(int idMoneda)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdMoneda", idMoneda)
            };

            using (DataTable dt = SqlClientUtility.ExecuteDataTable(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "MonedaSelect", parameters))
            {
                MonedaEntidad MonedaEntidad = new MonedaEntidad();

                MonedaEntidad = Mapeador.MapearFirst <MonedaEntidad>(dt);

                return(MonedaEntidad);
            }
        }
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                idioma = (LenguajeEntidad)Session["Idioma"];
                cargarFiscal();
                cargarProvincias();
                cargarLocalidades();


                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
            }
            else
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            DireccionesFacturacionDeUsuario.Clear();
            DireccionesEnvioDeUsuario.Clear();
            cargarTipoTel();
            usuarioentidad = (UsuarioEntidad)HttpContext.Current.Session["Usuario"];

            if (usuarioentidad == null)
            {
                Response.Redirect("Home.aspx");
            }

            usuario.Value = usuarioentidad.NombreUsuario;
            clave.Value   = usuarioentidad.Clave;
            clave.Value   = clave.Value.Replace(usuarioentidad.Clave, "*********");

            DatosPersonalesDTO DatosPersonalesDTO = new DatosPersonalesDTO()
            {
                Apellido = usuarioentidad.Apellido,
                Email    = usuarioentidad.Email,
                Nombre   = usuarioentidad.Nombre
            };


            List <DatosPersonalesDTO> ListaDatosPersonalesDTO = new List <DatosPersonalesDTO>();

            ListaDatosPersonalesDTO.Add(DatosPersonalesDTO);
            grilladedatospersonales.DataSource = ListaDatosPersonalesDTO;


            if (!IsPostBack)
            {
                idioma = (LenguajeEntidad)Session["Idioma"];
                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
                grilladedatospersonales.DataBind();
            }
            else
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }


            TelefonosDelUsuario = UsuarioBLL.SelectTelefonosDeUsuario(usuarioentidad.CUIT, usuarioentidad.NombreUsuario);
            if (TelefonosDelUsuario != null && TelefonosDelUsuario.Count > 0)
            {
                TelefonosDelUsuario = TelefonosDelUsuario.Where(X => X.FecBaja == null).ToList();
            }


            foreach (var tel in TelefonosDelUsuario)
            {
                TelefonoDTO TipodeTelefono = new TelefonoDTO();
                TipodeTelefono.Tipo     = UsuarioBLL.ObtenerTipodeTelefono(tel.miTipoTel.IdTipoTel);
                TipodeTelefono.Telefono = tel.NroTelefono;
                TipodeTelefono.CodArea  = tel.CodArea;
                ListaDeTelefonosDTO.Add(TipodeTelefono);
            }

            grillatelefonos.DataSource = ListaDeTelefonosDTO;

            if (!IsPostBack)
            {
                grillatelefonos.DataBind();
            }

            DireccionesDeUsuario = UsuarioBLL.SelectDireccionesDeUsuarioActuales(usuarioentidad);

            foreach (var item in DireccionesDeUsuario)
            {
                if (item.IdTipoDireccion == 1)
                {
                    DireccionesFacturacionDeUsuario.Add(item);
                }
                else if (item.IdTipoDireccion == 2)
                {
                    DireccionesEnvioDeUsuario.Add(item);
                }
            }

            grilladirecciondefacturacion.DataSource = DireccionesFacturacionDeUsuario;
            if (!IsPostBack)
            {
                grilladirecciondefacturacion.DataBind();
            }

            grilladirecciondeenvio.DataSource = DireccionesEnvioDeUsuario;
            if (!IsPostBack)
            {
                grilladirecciondeenvio.DataBind();
            }

            if (!IsPostBack)
            {
                CargarDropdownProvinciasFact();
                cargarLocalidadesFact();
                CargarDropdownProvinciasEnvio();
                cargarLocalidadesEnvio();
            }

            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }
        }
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}


        protected void Page_Load(object sender, EventArgs e)
        {
            var          Current      = HttpContext.Current;
            SucursalCore coreSucursal = new SucursalCore();

            //Session["FormaEnvio"] = 1;
            //Session["Seleccionada"] = coreSucursal.FindAll()[0].IdSucursal;



            idioma = new LenguajeEntidad();

            logueado = (UsuarioEntidad)Current.Session["Usuario"];

            if (logueado == null)
            {
                Response.Redirect("/Areas/Public/Forms/Home.aspx");
            }
            if (!IsPostBack)
            {
                idioma = (LenguajeEntidad)Session["Idioma"];

                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
            }
            else
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }

            if (!IsPostBack)
            {
                if (Current.Session["Productos"] == null)
                {
                    Response.Redirect("/Areas/Public/Forms/Home.aspx");
                }
                lista = (List <PedidoLista>)Current.Session["Pedido"];

                FormaEntrega = (int?)Current.Session["FormaEnvio"];
                //pedido = (int?)Current.Session["UltimoPedido"];
                totalizado = lista.Select(x => x.Cantidad * x.Producto.PrecioUnitario).Sum();
                //TODO: sacarle el precio de envio hardcodeado:
                if (FormaEntrega != null && FormaEntrega == (int)FormaEntregaEntidad.Options.Correo)
                {
                    totalizado = totalizado + 100;
                }
            }
            TarjetaCore           coreTarjeta = new TarjetaCore();
            List <TarjetaEntidad> MisTarjetas = coreTarjeta.SelectAllTarjetasByCUIT_NombreUsuario(ConfigSection.Default.Site.Cuit, logueado.NombreUsuario);

            foreach (var t in MisTarjetas)
            {
                if (t.Predeterminada == true)
                {
                    MiTarjeta = t;
                }
            }
        }
Example #24
0
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}


        protected void Page_Load(object sender, EventArgs e)
        {
            idioma        = new LenguajeEntidad();
            _coremoneda   = new MonedaCore();
            cotizacion    = new MonedaEmpresaEntidad();
            moneda        = new MonedaEntidad();
            listaRecursos = CargarRecursos();
            ProductoCore unProductoCore = new ProductoCore();

            if (!IsPostBack)
            {
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];

                idioma = (LenguajeEntidad)Session["Idioma"];
                if (cotizacion == null)
                {
                    cotizacion            = new MonedaEmpresaEntidad();
                    cotizacion.IdMoneda   = 1;
                    Session["Cotizacion"] = cotizacion;
                }
                if (cotizacion != null)
                {
                    moneda = _coremoneda.selectMoneda(cotizacion.IdMoneda);
                }
                // ProductoCore unProductoCore = new ProductoCore();
                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }



                //**************MOSTRAR PRODUCTOS DESTACADOS**********************************************************************
                //SI ESTA LOGUEADO
                //MUESTRA PRODUCTOS PRODUCTOS QUE ESTAN DENTRO DE LA MISMA CATEGORIA DE LOS ULTIMOS QUE COMPRO

                //SI NO
                //MUESTRA LOS ULTIMOS AGREGADOS AL ECOMMERCE
                unosProductosDestacados           = (List <ProductoEntidad>)unProductoCore.FindAllByCUIT(cotizacion.IdMoneda).Where(o => o.FecBaja == null).OrderByDescending(x => x.IdProducto).Take(2).ToList();
                lstProductosDestacados.DataSource = unosProductosDestacados;
                lstProductosDestacados.DataBind();


                //**************MOSTRAR PRODUCTOS MAS VENDIDOS (PARA LA SEGUNDA PESTAÑA)**********************************************************************
                unosProductosMasVendidos  = unProductoCore.ProductoSelectMasVendidosByCUIT(ConfigSection.Default.Site.Cuit, cotizacion.IdMoneda).Where(o => o.FecBaja == null).ToList();
                lstMasVendidos.DataSource = unosProductosMasVendidos;
                lstMasVendidos.DataBind();
            }
            else
            {
                //Response.Redirect("LayoutBasico.aspx");
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;

                if (cotizacion != null)
                {
                    moneda = _coremoneda.selectMoneda(cotizacion.IdMoneda);
                }
                unosProductosDestacados = (List <ProductoEntidad>)unProductoCore.FindAllByCUIT(cotizacion.IdMoneda).Where(o => o.FecBaja == null).OrderByDescending(x => x.IdProducto).Take(2).ToList();
                // var miDropMoneda = Master.combo.SelectedItem.Value;

                // Master.FindControl("DRWMoneda");
                lstProductosDestacados.DataSource = unosProductosDestacados;
                // cotizacion.Cotizacion = this.Master.cotizacion.Cotizacion;
                lstProductosDestacados.DataBind();
                unosProductosMasVendidos  = unProductoCore.ProductoSelectMasVendidosByCUIT(ConfigSection.Default.Site.Cuit, cotizacion.IdMoneda).Where(o => o.FecBaja == null).ToList();
                lstMasVendidos.DataSource = unosProductosMasVendidos;
                lstMasVendidos.DataBind();
            }

            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }

            //pruebo lo de idioma para que quede seteado el combo cuando vuelve a home desde cualquier otra pagina

            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
                //  lblIdioma.Items.FindByValue(CultureInfo.CurrentCulture.Name).Selected = true;
                //Thread.CurrentThread.CurrentCulture = new CultureInfo(idioma.DescripcionLenguaje);
                //Thread.CurrentThread.CurrentUICulture = new CultureInfo(idioma.DescripcionLenguaje);
            }
        }
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}

        protected void Page_Load(object sender, EventArgs e)
        {
            //En caso de no tener un Pedido vigente redirige a home
            var Current = HttpContext.Current;

            if (Current.Session["Productos"] == null)
            {
                Response.Redirect("/Areas/Public/Forms/Home.aspx");
            }

            logueado = (UsuarioEntidad)Current.Session["Usuario"];
            idioma   = new LenguajeEntidad();
            if (!IsPostBack)
            {
                idioma = (LenguajeEntidad)Session["Idioma"];

                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
            }
            else
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }
            if (logueado != null)
            {
                var dirs = _usuarioManager.FindDireccionesPredeterminadas(logueado);

                direccionEnvio = dirs
                                 .Where(x => x.IdTipoDireccion == (int)TipoDireccionEntidad.Options.Envio)
                                 .FirstOrDefault();

                direccionFacturacion = dirs
                                       .Where(x => x.IdTipoDireccion == (int)TipoDireccionEntidad.Options.Facturacion)
                                       .FirstOrDefault();

                telefonoContacto = _usuarioManager.FindTelefonoContacto(logueado.NombreUsuario);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            logueado = (UsuarioEntidad)Current.Session["Usuario"];

            if (logueado == null)
            {
                Response.Redirect("/Areas/Public/Forms/Home.aspx");
            }
            if (!IsPostBack)
            {
                cotizacion = (MonedaEmpresaEntidad)Current.Session["Cotizacion"];

                idioma = (LenguajeEntidad)Session["Idioma"];

                if (cotizacion == null)
                {
                    cotizacion                    = new MonedaEmpresaEntidad();
                    cotizacion.IdMoneda           = 1;
                    Current.Session["Cotizacion"] = cotizacion;
                }
                if (cotizacion != null)
                {
                    moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
                }
                cotizacion = _coreMoneda.Select(cotizacion.IdMoneda);

                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
            }
            else
            {
                idioma.DescripcionLenguaje    = this.Master.obtenerIdiomaCombo();
                Current.Session["Idioma"]     = idioma;
                cotizacion.IdMoneda           = Convert.ToInt16(this.Master.obtenerValorDropDown());
                Current.Session["Cotizacion"] = cotizacion;
                if (cotizacion != null)
                {
                    moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
                }
                cotizacion = _coreMoneda.Select(cotizacion.IdMoneda);
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }
            //if (!IsPostBack)
            //{
            //    cargarListaDeseos();
            //}
            //cargarListaDeseos();
        }
Example #27
0
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}

        protected void Page_Load(object sender, EventArgs e)
        {
            idioma = new LenguajeEntidad();

            if (!IsPostBack)
            {
                cargarFiltros();

                idioma     = (LenguajeEntidad)Session["Idioma"];
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];

                if (cotizacion == null)
                {
                    cotizacion            = new MonedaEmpresaEntidad();
                    cotizacion.IdMoneda   = 1;
                    Session["Cotizacion"] = cotizacion;
                }

                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                if (cotizacion != null)
                {
                    moneda = _coremoneda.selectMoneda(cotizacion.IdMoneda);
                }

                stringBusqueda  = Page.Request.QueryString["search"];
                stringCategoria = Page.Request.QueryString["Categoria"];
                Session.Add("ProductosEnSesion", unosProductos);



                if (!string.IsNullOrEmpty(stringBusqueda))
                {
                    if (stringBusqueda == "*")
                    {
                        //unosProductos = _manager.ProductoSelectMasVendidosByCUIT(TFI.CORE.Helpers.ConfigSection.Default.Site.Cuit);
                        unosProductos       = _manager.FindAllByCUIT(cotizacion.IdMoneda).Where(o => o.FecBaja == null).ToList();
                        catalogo.DataSource = unosProductos;
                        catalogo.DataBind();
                        Session["ProductosEnSesion"] = unosProductos;
                    }
                    else
                    {
                        var cotizacionStatic = new MonedaEmpresaEntidad();
                        cotizacionStatic = (MonedaEmpresaEntidad)Current.Session["Cotizacion"];
                        //                      unosProductos = _manager.FindAllByDescripProducto(stringBusqueda);
                        unosProductos       = _manager.FindAllByDescripProducto(stringBusqueda, cotizacionStatic.IdMoneda).Where(o => o.FecBaja == null).ToList();
                        catalogo.DataSource = unosProductos;
                        catalogo.DataBind();
                        Session["ProductosEnSesion"] = unosProductos;
                    }
                }


                if (!string.IsNullOrEmpty(stringCategoria))
                {
                    if (Int32.Parse(stringCategoria) > 0 && Int32.Parse(stringCategoria) < 500)
                    {
                        unosProductos       = _manager.ProductoSelectByCategoria(Int32.Parse(stringCategoria), cotizacion.IdMoneda).Where(o => o.FecBaja == null).ToList();
                        catalogo.DataSource = unosProductos;
                        catalogo.DataBind();
                        Session["ProductosEnSesion"] = unosProductos;
                    }
                    else
                    {
                        notif.Attributes.Remove("hidden");
                        notif.InnerHtml = string.Format("<span>{0}</span>", "No existe la categoría ingresada");
                    }
                }



                if (!unosProductos.Any())
                {
                    notif.Attributes.Remove("hidden");
                    notif.InnerHtml = string.Format("<span>{0}</span>", "No se encontraron productos, por favor realice otra búsqueda");
                }
            }

            else
            {
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                unosProductos         = (List <ProductoEntidad>)Session["ProductosEnSesion"];
                cotizacion            = _coremoneda.Select(cotizacion.IdMoneda);
                Session["Cotizacion"] = cotizacion;
                foreach (var item in unosProductos)
                {
                    var item2 = _manager.Find(item.IdProducto, cotizacion.IdMoneda);
                    //if (cotizacion.Cotizacion >1)
                    //{
                    //    item.PrecioUnitario = item2.PrecioUnitario / cotizacion.Cotizacion;
                    //}
                    //else
                    //{ item.PrecioUnitario = item2.PrecioUnitario * cotizacion.Cotizacion; }
                    item.PrecioUnitario = decimal.Round(item2.PrecioUnitario, 2);
                }
                catalogo.DataSource = unosProductos;
                catalogo.DataBind();
            }
            if (cotizacion != null)
            {
                moneda = _coremoneda.selectMoneda(cotizacion.IdMoneda);
            }
            //CargarCategorias

            unasCategorias           = ManagerCategoria.SeleccionarCategorias();
            rptCategorias.DataSource = unasCategorias;
            rptCategorias.DataBind();
            //seteo el combo de moneda cuando refresco en el elegido sino se pierde
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
                //  lblIdioma.Items.FindByValue(CultureInfo.CurrentCulture.Name).Selected = true;
                //Thread.CurrentThread.CurrentCulture = new CultureInfo(idioma.DescripcionLenguaje);
                //Thread.CurrentThread.CurrentUICulture = new CultureInfo(idioma.DescripcionLenguaje);
            }
            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }

            var valordropdown = Session["ValorDrop"];

            if (valordropdown != null)
            {
                if (Convert.ToInt32(valordropdown) == 0)
                {
                    catalogo.DataSource = unosProductos.OrderByDescending(x => x.PrecioUnitario);;
                    catalogo.DataBind();
                }
                else if (Convert.ToInt32(valordropdown) == 1)
                {
                    catalogo.DataSource = unosProductos.OrderBy(x => x.PrecioUnitario);;
                    catalogo.DataBind();
                }
                else if (Convert.ToInt32(valordropdown) == 2)
                {
                    catalogo.DataSource = unosProductos.OrderByDescending(x => x.DescripProducto);;
                    catalogo.DataBind();
                }
                else if (Convert.ToInt32(valordropdown) == 3)
                {
                    catalogo.DataSource = unosProductos.OrderBy(x => x.DescripProducto);;
                    catalogo.DataBind();
                }
            }
        }
Example #28
0
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}

        protected void Page_Load(object sender, EventArgs e)
        {
            //En caso de no tener un Pedido vigente redirige a home
            var Current = HttpContext.Current;

            if (Current.Session["Productos"] == null)
            {
                Response.Redirect("/Areas/Public/Forms/Home.aspx");
            }


            idioma = new LenguajeEntidad();
            if (!IsPostBack)//Si es la primera vez
            {
                idioma = (LenguajeEntidad)Session["Idioma"];
                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
            }
            else //Si esta recargando
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }


            //Son los productos que hay en el Pedido actual, sin cantidades
            productos = (List <ProductoEntidad>)Current.Session["Productos"];

            //Es el detale del Pedido, Productos y cantidades
            lista = (List <PedidoLista>)Current.Session["Pedido"];



            if (productos == null || !productos.Any())
            {
                MostrarCarritoVacio();
            }

            if (productos != null)
            {
                RedondearPrecioUnitario();

                CrearPedidoLista();
            }
        }
Example #29
0
        ////Para mantener la sesión activa
        //[WebMethod(EnableSession = true)]
        //public static void MantenerSesion()
        //{

        //}

        protected void Page_Load(object sender, EventArgs e)
        {
            //En caso de no tener un Pedido vigente redirige a home
            var Current = HttpContext.Current;

            if (Current.Session["Productos"] == null)
            {
                Response.Redirect("/Areas/Public/Forms/Home.aspx");
            }

            idioma   = new LenguajeEntidad();
            logueado = (UsuarioEntidad)Current.Session["Usuario"];
            //Para armar lista PedidosDetalles y enviarlo como param a la BLL y obtener sucursales con stock suficiente
            ProdCantEnPedido = (List <PedidoLista>)Current.Session["Pedido"];
            if (ProdCantEnPedido != null && ProdCantEnPedido.Count > 0)
            {
                unosPedidosDetalles = new List <PedidoDetalleEntidad>();
                PedidoDetalleEntidad unPedDet;
                //Para armar lista PedidosDetalles y enviarlo como param a la BLL y obtener sucursales con stock suficiente
                foreach (PedidoLista UnProdCant in ProdCantEnPedido)
                {
                    unPedDet                       = new PedidoDetalleEntidad();
                    unPedDet.miProducto            = new ProductoEntidad();
                    unPedDet.miProducto.IdProducto = UnProdCant.Producto.IdProducto;
                    unPedDet.Cantidad              = UnProdCant.Cantidad;
                    unosPedidosDetalles.Add(unPedDet);
                }
            }
            //Fin: //Para armar lista PedidosDetalles y enviarlo como param a la BLL y obtener sucursales con stock suficiente

            if (!IsPostBack)
            {
                idioma = (LenguajeEntidad)Session["Idioma"];

                if (idioma == null)
                {
                    idioma = new LenguajeEntidad();
                    idioma.DescripcionLenguaje = "es";
                    Session["Idioma"]          = idioma;
                }
                cotizacion = new MonedaEmpresaEntidad();
                cotizacion = (MonedaEmpresaEntidad)Session["Cotizacion"];
                Session.Add("cotizacionAnterior", "");
            }
            else
            {
                cotizacion.IdMoneda        = Convert.ToInt16(Master.obtenerValorDropDown());
                Session["Cotizacion"]      = cotizacion;
                idioma.DescripcionLenguaje = Master.obtenerIdiomaCombo();
                Session["Idioma"]          = idioma;
            }
            if (cotizacion != null)
            {
                moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);
            }
            DropDownList lblIdioma = FindControlFromMaster <DropDownList>("ddlLanguages");

            if (lblIdioma != null)
            {
                lblIdioma.SelectedValue = idioma.DescripcionLenguaje;
            }
            DropDownList lblStatus = FindControlFromMaster <DropDownList>("MonedaDRW");

            if (lblStatus != null)
            {
                if (cotizacion != null)
                {
                    lblStatus.SelectedValue = cotizacion.IdMoneda.ToString();
                }
            }

            formaEnvioId = (int?)Current.Session["FormaEnvio"];
            Current.Session["FormaEnvio"] = 1;//REVISAR
            if (logueado == null)
            {
                Response.Redirect("/Areas/Public/Forms/Pedidos.aspx");
            }
            //Antes obtenía todas las sucursales
            //sucursalesDisponibles = _sucursalCore.FindAll();
            //Ahora se obtienen las que poseen stock unicamente
            sucursalesDisponibles = _sucursalCore.TraerSucursalesConStock(unosPedidosDetalles);

            if (sucursalesDisponibles.Count > 0)
            {
                Session.Add("SucursalesDisponibles", sucursalesDisponibles);                       //Guardo en Sesión las sucursales disponibles para tomarlas en WebMethod "FormaEnvio"
                HttpContext.Current.Session["Seleccionada"] = sucursalesDisponibles[0].IdSucursal; //Sucursal seleccionada, en este momento la primera que tiene stock
                seleccionado = sucursalesDisponibles[0].IdSucursal;                                //Sucursal seleccionada, en este momento la primera que tiene stock, por si no hago click y queda
                //seleccionado Envío por correo
            }

            else
            {
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(@"<script type='text/javascript'>");
                //sb.Append("$('#currentdetail').modal('show');");
                sb.Append("alert('No se puede realizar el Pedido con la cantidad de Productos solicitada, por favor comuníquese con nosotros');");
                sb.Append(@"</script>");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "ModalScript", sb.ToString(), false);
            }
        }
        public static List <String> ObtenerDeseosSession()
        {
            var                  Current         = HttpContext.Current;
            MonedaEntidad        moneda          = new MonedaEntidad();
            MonedaCore           _coreMoneda     = new MonedaCore();
            MonedaEmpresaEntidad cotizacion      = (MonedaEmpresaEntidad)Current.Session["Cotizacion"];
            ProductoCore         ManagerProducto = new ProductoCore();

            if (cotizacion == null)
            {
                cotizacion                    = new MonedaEmpresaEntidad();
                cotizacion.IdMoneda           = 1;
                Current.Session["Cotizacion"] = cotizacion;
            }
            moneda = _coreMoneda.selectMoneda(cotizacion.IdMoneda);

            var plantilla =
                "<tr class=\"{0}\">" +
                "<td class=\"text-center\" style=\"padding: 7px;\">" +
                "<div class=\"img-thumbnail img-thumbnail-cart\">" +
                "<img class=\"img-responsive\" src=\"/Content/Images/Productos/{1}\" style=\"vertical-align: middle;\" />" +
                "</div>" +
                "</td>" +
                "<td class=\"product-descripcion\">" +
                "<h4>{2}</h4>" +
                "<small>SKU: {3}</small>" +
                "</td>" +
                "<td class=\"text-center\">" +
                "<p>" +
                "<span>{4}</span> <span>{5}</span>" +
                "</p>" +
                "</td>" +
                "<td class=\"text-center\">" +
                "<button class=\"btn btn-info\" id=\"btnComprar2\" data-producto2=\"{6}\" onclick=\"onBtnComprar(this)\">Comprar</button>" +
                "</td>" +
                "<td class=\"text-center\">" +
                "<button class=\"btn btn-danger\" id=\"btnEliminarDeseo\" data-prodeliminar=\"{7}\" onclick=\"onbtnEliminarDeseo(this)\">Eliminar</button>" +
                "</td>" +
                "</tr>";   //FIN Plantilla

            var pl = new List <String>();

            List <ProductoEntidad> unosDeseos = (List <ProductoEntidad>)Current.Session["ListaDeseos"];
            List <ProductoEntidad> unosDeseosPrecioCalculo = new List <ProductoEntidad>();

            if (unosDeseos != null && unosDeseos.Any())
            {
                foreach (ProductoEntidad unDeseo in unosDeseos)
                {
                    unosDeseosPrecioCalculo.Add(ManagerProducto.Find(unDeseo.IdProducto, moneda.IdMoneda));
                }


                //foreach (ProductoEntidad unDeseo in unosDeseos)
                //{
                //    if (cotizacion.Cotizacion > 1)
                //        unDeseo.PrecioUnitario = System.Decimal.Round(unDeseo.PrecioUnitario / cotizacion.Cotizacion, 2);
                //    else
                //        unDeseo.PrecioUnitario = System.Decimal.Round(unDeseo.PrecioUnitario * cotizacion.Cotizacion, 2);
                //}

                unosDeseosPrecioCalculo.ForEach(x => pl.Add(string.Format(plantilla, x.IdProducto, x.URL, x.DescripProducto, x.CodigoProducto, moneda.SimboloMoneda, x.PrecioUnitario, x.IdProducto, x.IdProducto)));
            }

            return(pl);
        }