Пример #1
0
        public ActionResult INV_005(bool mostrar_detallado = false)
        {
            cl_filtros_inventario_Info model = new cl_filtros_inventario_Info
            {
                IdEmpresa  = Convert.ToInt32(SessionFixed.IdEmpresa),
                IdSucursal = Convert.ToInt32(SessionFixed.IdSucursal),
            };

            cargar_combos(model);
            if (mostrar_detallado)
            {
                INV_005_detalle_Rpt model_detalle = new INV_005_detalle_Rpt();
                model_detalle.p_IdEmpresa.Value               = model.IdEmpresa;
                model_detalle.p_IdSucursal.Value              = model.IdSucursal;
                model_detalle.p_IdBodega.Value                = model.IdBodega;
                model_detalle.P_IdProductoPadre.Value         = model.IdProductoPadre == null ? 0 : model.IdProductoPadre;
                model_detalle.p_IdProducto.Value              = model.IdProducto == null ? 0 : model.IdProducto;
                model_detalle.p_IdUsuario.Value               = SessionFixed.IdUsuario;
                model_detalle.p_fecha_ini.Value               = model.fecha_ini;
                model_detalle.p_fecha_fin.Value               = model.fecha_fin;
                model_detalle.p_mostrar_detallado.Value       = model.mostrar_detallado;
                model_detalle.p_no_mostrar_valores_en_0.Value = model.no_mostrar_valores_en_0;

                model_detalle.usuario = SessionFixed.IdUsuario.ToString();
                model_detalle.empresa = SessionFixed.NomEmpresa.ToString();
                ViewBag.report        = model_detalle;
            }
            else
            {
                INV_005_resumen_Rpt model_resumen = new INV_005_resumen_Rpt();
                model_resumen.p_IdEmpresa.Value               = model.IdEmpresa;
                model_resumen.p_IdSucursal.Value              = model.IdSucursal;
                model_resumen.p_IdBodega.Value                = model.IdBodega;
                model_resumen.P_IdProductoPadre.Value         = model.IdProductoPadre == null ? 0 : model.IdProductoPadre;
                model_resumen.p_IdProducto.Value              = model.IdProducto == null ? 0 : model.IdProducto;
                model_resumen.p_IdUsuario.Value               = SessionFixed.IdUsuario;
                model_resumen.p_fecha_ini.Value               = model.fecha_ini;
                model_resumen.p_fecha_fin.Value               = model.fecha_fin;
                model_resumen.p_mostrar_detallado.Value       = model.mostrar_detallado;
                model_resumen.p_no_mostrar_valores_en_0.Value = model.no_mostrar_valores_en_0;

                model_resumen.usuario = SessionFixed.IdUsuario.ToString();
                model_resumen.empresa = SessionFixed.NomEmpresa.ToString();
                ViewBag.report        = model_resumen;
            }

            return(View(model));
        }
        public ActionResult INV_005(cl_filtros_inventario_Info model)
        {
            if (model.mostrar_detallado)
            {
                INV_005_detalle_Rpt report = new INV_005_detalle_Rpt();
                report.p_IdEmpresa.Value               = model.IdEmpresa;
                report.p_IdSucursal.Value              = model.IdSucursal;
                report.p_IdBodega.Value                = model.IdBodega;
                report.P_IdProductoPadre.Value         = model.IdProductoPadre == null ? 0 : model.IdProductoPadre;
                report.p_IdProducto.Value              = model.IdProducto;
                report.p_IdUsuario.Value               = SessionFixed.IdUsuario;
                report.p_fecha_ini.Value               = model.fecha_ini;
                report.p_fecha_fin.Value               = model.fecha_fin;
                report.p_mostrar_detallado.Value       = model.mostrar_detallado;
                report.p_no_mostrar_valores_en_0.Value = model.no_mostrar_valores_en_0;
                cargar_combos(model);

                report.usuario = SessionFixed.IdUsuario.ToString();
                report.empresa = SessionFixed.NomEmpresa.ToString();
                ViewBag.Report = report;
            }
            else
            {
                INV_005_resumen_Rpt report = new INV_005_resumen_Rpt();
                report.p_IdEmpresa.Value               = model.IdEmpresa;
                report.p_IdSucursal.Value              = model.IdSucursal;
                report.p_IdBodega.Value                = model.IdBodega;
                report.P_IdProductoPadre.Value         = model.IdProductoPadre == null ? 0 : model.IdProductoPadre;
                report.p_IdProducto.Value              = model.IdProducto;
                report.p_IdUsuario.Value               = SessionFixed.IdUsuario;
                report.p_fecha_ini.Value               = model.fecha_ini;
                report.p_fecha_fin.Value               = model.fecha_fin;
                report.p_mostrar_detallado.Value       = model.mostrar_detallado;
                report.p_no_mostrar_valores_en_0.Value = model.no_mostrar_valores_en_0;
                cargar_combos(model);

                report.usuario = SessionFixed.IdUsuario.ToString();
                report.empresa = SessionFixed.NomEmpresa.ToString();
                ViewBag.Report = report;
            }
            return(View(model));
        }