Beispiel #1
0
        public ActionResult Consultar(string IdCatalogo = "", int IdCatalogo_tipo = 0, bool Exito = false)
        {
            in_Catalogo_Info model = bus_catalogo.get_info(IdCatalogo);

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

            #region Permisos
            seg_Menu_x_Empresa_x_Usuario_Info info = bus_permisos.get_list_menu_accion(Convert.ToInt32(SessionFixed.IdEmpresa), SessionFixed.IdUsuario, "Inventario", "CatalogoTipoInventario", "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

            ViewBag.IdCatalogo_tipo = model.IdCatalogo_tipo;
            cargar_combos();
            return(View(model));
        }
Beispiel #2
0
        public ActionResult Modificar(string IdCatalogo = "", int IdCatalogo_tipo = 0)
        {
            in_Catalogo_Info model = bus_catalogo.get_info(IdCatalogo);

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