public ActionResult ROL_009(cl_filtros_Info model)
        {
            model.IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa);
            string novedad = "";

            foreach (var item in model.estado_novedad)
            {
                novedad += item + ",";
            }
            cargar_combos(model.IdEmpresa);
            ROL_009_Rpt report = new ROL_009_Rpt();

            report.p_IdEmpresa.Value      = model.IdEmpresa;
            report.p_IdSucursal.Value     = model.IdSucursal;
            report.p_IdTipo_Nomina.Value  = model.IdTipoNomina;
            report.p_fecha_inicio.Value   = model.fecha_ini;
            report.p_fecha_fin.Value      = model.fecha_fin;
            report.p_estado_novedad.Value = novedad;
            report.p_IdEmpleado.Value     = model.IdEmpleado == null ? 0 : Convert.ToDecimal(model.IdEmpleado);
            report.p_IdRubro.Value        = model.IdRubro == null ? "" : Convert.ToString(model.IdRubro);
            report.usuario           = SessionFixed.IdUsuario.ToString();
            report.empresa           = SessionFixed.NomEmpresa.ToString();
            report.P_IdArea.Value    = model.IdArea;
            report.P_TipoRubro.Value = model.TipoRubro;
            ViewBag.Report           = report;
            return(View(model));
        }
        public ActionResult ROL_009(DateTime?fecha_ini, DateTime?fecha_fin, bool mostrar_nov_can = false, bool mostrar_nov_pen = false, bool mostrar_todas_nov = false)
        {
            cl_filtros_Info model = new cl_filtros_Info
            {
                IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa)
            };

            cargar_combos(model.IdEmpresa);
            ROL_009_Rpt report = new ROL_009_Rpt();

            report.p_IdEmpresa.Value    = model.IdEmpresa;
            report.p_fecha_inicio.Value = model.fecha_ini;
            report.p_fecha_fin.Value    = model.fecha_fin;
            report.p_can.Value          = mostrar_nov_can;
            report.p_pen.Value          = mostrar_nov_pen;
            report.p_todas.Value        = mostrar_todas_nov;
            report.usuario = SessionFixed.IdUsuario.ToString();
            report.empresa = SessionFixed.NomEmpresa.ToString();
            ViewBag.Report = report;
            return(View(model));
        }
        public ActionResult ROL_009()
        {
            string[] novedad = new string[2] {
                "PEN", "CAN"
            };
            cl_filtros_Info model = new cl_filtros_Info
            {
                IdEmpresa      = Convert.ToInt32(SessionFixed.IdEmpresa),
                IdSucursal     = Convert.ToInt32(SessionFixed.IdSucursal),
                IdTipoNomina   = 1,
                fecha_ini      = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1),
                fecha_fin      = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1),
                estado_novedad = novedad,
                TipoRubro      = "",
                IdArea         = 0
            };

            cargar_combos(model.IdEmpresa);
            ROL_009_Rpt report = new ROL_009_Rpt();

            report.p_IdEmpresa.Value      = model.IdEmpresa;
            report.p_IdSucursal.Value     = model.IdSucursal;
            report.p_IdTipo_Nomina.Value  = model.IdTipoNomina;
            report.p_fecha_inicio.Value   = model.fecha_ini;
            report.p_fecha_fin.Value      = model.fecha_fin;
            report.p_estado_novedad.Value = novedad == null ? "" : Convert.ToString(model.estado_novedad);
            report.p_IdEmpleado.Value     = model.IdEmpleado == null ? 0 : Convert.ToDecimal(model.IdEmpleado);
            report.p_IdRubro.Value        = model.IdRubro == null ? "" : Convert.ToString(model.IdEmpleado);
            report.usuario           = SessionFixed.IdUsuario.ToString();
            report.empresa           = SessionFixed.NomEmpresa.ToString();
            report.P_IdArea.Value    = 0;
            report.P_TipoRubro.Value = "";
            ViewBag.Report           = report;

            return(View(model));
        }