public ActionResult Index()
        {
            #region Validar Session
            if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession))
            {
                return(RedirectToAction("Login", new { Area = "", Controller = "Account" }));
            }
            SessionFixed.IdTransaccionSession       = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString();
            SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession;
            #endregion
            cp_orden_pago_aprobacion_Info model = new cp_orden_pago_aprobacion_Info
            {
                IdEmpresa            = string.IsNullOrEmpty(SessionFixed.IdEmpresa) ? 0 : Convert.ToInt32(SessionFixed.IdEmpresa),
                IdSucursal           = string.IsNullOrEmpty(SessionFixed.IdSucursal) ? 0 : Convert.ToInt32(SessionFixed.IdSucursal),
                IdUsuarioAprobacion  = string.IsNullOrEmpty(SessionFixed.IdUsuario) ? "" : SessionFixed.IdUsuario,
                IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual),
                fecha_ini            = DateTime.Now.Date.AddMonths(-1),
                fecha_fin            = DateTime.Now.Date,
            };

            //List_aprobacion_op.set_list(new List<cp_orden_pago_Info>(), model.IdTransaccionSession);
            var lst = bus_orden_pago.get_list(model.IdEmpresa, model.fecha_ini, model.fecha_fin, model.IdSucursal);
            List_aprobacion_op.set_list(lst, model.IdTransaccionSession);
            cargar_combos_consulta(model.IdEmpresa);
            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            #region Validar Session
            if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession))
            {
                return(RedirectToAction("Login", new { Area = "", Controller = "Account" }));
            }
            SessionFixed.IdTransaccionSession       = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString();
            SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession;
            #endregion

            #region Permisos
            seg_Menu_x_Empresa_x_Usuario_Info info = bus_permisos.get_list_menu_accion(Convert.ToInt32(SessionFixed.IdEmpresa), SessionFixed.IdUsuario, "CuentasPorPagar", "OrdenPago", "Index");
            ViewBag.Nuevo = info.Nuevo;
            #endregion

            cl_filtros_Info model = new cl_filtros_Info
            {
                IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSession),
                IdEmpresa            = Convert.ToInt32(SessionFixed.IdEmpresa),
                IdSucursal           = Convert.ToInt32(SessionFixed.IdSucursal),
                fecha_ini            = DateTime.Now.Date.AddMonths(-1),
                fecha_fin            = DateTime.Now.Date
            };

            //lst_ordenes_pagos = bus_orden_pago.get_list(model.IdEmpresa, model.fecha_ini, model.fecha_fin, model.IdSucursal);
            //lista_orden_pago.set_list(lst_ordenes_pagos, Convert.ToDecimal(SessionFixed.IdTransaccionSession));

            var lst = bus_orden_pago.get_list(model.IdEmpresa, model.fecha_ini, model.fecha_fin, model.IdSucursal);
            Lista_OrdenPago.set_list(lst, model.IdTransaccionSession);
            cargar_combos_consulta(model.IdEmpresa);

            return(View(model));
        }
Esempio n. 3
0
        public ActionResult Index()
        {
            cl_filtros_Info model = new cl_filtros_Info
            {
                IdEmpresa  = string.IsNullOrEmpty(SessionFixed.IdEmpresa) ? 0 : Convert.ToInt32(SessionFixed.IdEmpresa),
                IdSucursal = string.IsNullOrEmpty(SessionFixed.IdSucursal) ? 0 : Convert.ToInt32(SessionFixed.IdSucursal),
                fecha_ini  = DateTime.Now.Date.AddMonths(-1),
                fecha_fin  = DateTime.Now.Date
            };

            lst_ordenes_pagos = bus_orden_pago.get_list(model.IdEmpresa, model.fecha_ini, model.fecha_fin, model.IdSucursal);
            lista_orden_pago.set_list(lst_ordenes_pagos, Convert.ToDecimal(SessionFixed.IdTransaccionSession));

            cargar_combos_consulta(model.IdEmpresa);

            return(View(model));
        }
Esempio n. 4
0
        public ActionResult GridViewPartial_ordenes_pagos(DateTime?Fecha_ini, DateTime?Fecha_fin)
        {
            int IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa);

            ViewBag.Fecha_ini = Fecha_ini == null?DateTime.Now.Date.AddMonths(-1) : Convert.ToDateTime(Fecha_ini);

            ViewBag.Fecha_fin = Fecha_fin == null ? DateTime.Now.Date : Convert.ToDateTime(Fecha_fin);

            lst_ordenes_pagos = bus_orden_pago.get_list(IdEmpresa, ViewBag.Fecha_ini, ViewBag.Fecha_fin);
            return(PartialView("_GridViewPartial_ordenes_pagos", lst_ordenes_pagos));
        }