Exemplo n.º 1
0
        public ActionResult ReporteInventarioMovimiento()
        {
            string      tipo     = (Request.HttpMethod == "POST" ? Request.Params["tipo"] : "1,2,3");
            Ent_Usuario _usuario = (Ent_Usuario)Session[Ent_Constantes.NameSessionUser];
            //Dat_ECommerce ec = new Dat_ECommerce();
            var ip = new Dat_InventarioPlanilla();

            string actionName     = this.ControllerContext.RouteData.GetRequiredString("action");
            string controllerName = this.ControllerContext.RouteData.GetRequiredString("controller");
            string return_view    = actionName + "|" + controllerName;

            if (_usuario == null)
            {
                return(RedirectToAction("Login", "Control", new { returnUrl = return_view }));
            }
            else
            {
                ViewBag.Tienda = ip.get_ListaTienda("", 0, Session["PAIS"].ToString());

                //ViewBag._selectTipos = SelectTipos((tipo == null ? " '',R,E" : tipo));

                //if (_usuario.usu_tip_id == "05") //INVITADO (TIENDAS)
                //{
                //    ViewBag.Tienda = ec.get_ListaTienda(_usuario.usu_login, 0);

                //}
                //else
                //{
                //    ViewBag.Tienda = ec.get_ListaTienda("", 1);
                //}

                //ViewBag.usu_tipo = _usuario.usu_tip_id;
            }
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult ShowGenericReportInventarioPlanillaInNewWin(string tda, string fecIni)
        {
            try
            {
                string CodTda = "";
                var    ip     = new Dat_InventarioPlanilla();
                HttpContext.Session["ReportName"] = "ReporteInventarioPlanilla.rpt";

                //if (Session["Tienda"] != null)
                //{
                //    CodTda = Session["Tienda"].ToString();
                //}
                //else
                //{
                //    //CodTda = "-1";
                //    CodTda = tda;
                //}

                //ReporteVentasEcommerce ModeloRepVentaEcommerce = ec.get_ecommerce_reporteventa(CodTda, fecIni, FecFin, tipo);
                Models_InventarioPlanilla ModeloInventarioPlanilla = ip.get_InventarioPlanilla(tda, fecIni);

                HttpContext.Session["rptSource"] = ModeloInventarioPlanilla.ListInventarioPlanilla;

                var _estado = (ModeloInventarioPlanilla == null) ? "0" : "1";

                if (ModeloInventarioPlanilla != null)
                {
                    if (ModeloInventarioPlanilla.ListInventarioPlanilla.Count == 0)
                    {
                        _estado = "-1";
                        //ViewBag.Tienda = ec.get_ListaTienda();
                    }
                }

                return(Json(new
                {
                    estado = _estado
                }));
            }
            catch (Exception ex)
            {
                ex.Message.ToString();
                throw;
            }
        }