Beispiel #1
0
        public ActionResult Consultar(string IdPais = "", bool Exito = false)
        {
            tb_pais_Info model = bus_pais.get_info(IdPais);

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

            #region Permisos
            seg_Menu_x_Empresa_x_Usuario_Info info = bus_permisos.get_list_menu_accion(Convert.ToInt32(SessionFixed.IdEmpresa), SessionFixed.IdUsuario, "General", "Pais", "Index");
            if (model.estado == "I")
            {
                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

            if (Exito)
            {
                ViewBag.MensajeSuccess = MensajeSuccess;
            }

            return(View(model));
        }
        public ActionResult Modificar(string IdPais = "")
        {
            tb_pais_Info model = bus_pais.get_info(IdPais);

            if (model == null)
            {
                return(RedirectToAction("Index"));
            }
            return(View(model));
        }