Ejemplo n.º 1
0
        public ActionResult Consultar(int IdEmpresa = 0, decimal IdArea = 0, decimal IdDepartamento = 0, bool Exito = false)
        {
            Af_Departamento_Info model = bus_dep.GetInfo(IdEmpresa, IdArea, IdDepartamento);

            if (model == null)
            {
                return(RedirectToAction("Index", new { IdArea = IdArea }));
            }

            #region Permisos
            seg_Menu_x_Empresa_x_Usuario_Info info = bus_permisos.get_list_menu_accion(Convert.ToInt32(SessionFixed.IdEmpresa), SessionFixed.IdUsuario, "ActivoFijo", "AreaAF", "Index");
            if (model.Estado == false)
            {
                info.Modificar = false;
                info.Anular    = false;
            }
            model.Nuevo     = (info.Nuevo == true ? 1 : 0);
            model.Modificar = (info.Modificar == true ? 1 : 0);
            model.Anular    = (info.Anular == true ? 1 : 0);
            #endregion

            ViewBag.IdArea = model.IdArea;
            cargar_combos();
            if (Exito)
            {
                ViewBag.MensajeSuccess = MensajeSuccess;
            }
            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult Modificar(int IdEmpresa = 0, decimal IdDepartamento = 0)
        {
            Af_Departamento_Info model = bus_dep.GetInfo(IdEmpresa, IdDepartamento);

            if (model == null)
            {
                return(RedirectToAction("Index"));
            }
            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult Modificar(int IdEmpresa = 0, decimal IdArea = 0, decimal IdDepartamento = 0)
        {
            Af_Departamento_Info model = bus_dep.GetInfo(IdEmpresa, IdArea, IdDepartamento);

            if (model == null)
            {
                return(RedirectToAction("Index", new { IdArea = IdArea }));
            }
            ViewBag.IdArea = model.IdArea;
            cargar_combos();
            return(View(model));
        }