Example #1
0
        public ActionResult Empresa()
        {
            if (!this.currentUser()) { return RedirectToAction("Ingresar"); }
            if (!this.isAdministrator()) { return RedirectToAction("Index"); }
            MenuNavBarSelected(0);
            UsuarioDTO currentUser = getCurrentUser();

            EmpresaBL objBL = new EmpresaBL();
            ViewBag.lstMonedas = objBL.getListaMonedas();

            var objSent = TempData["Empresa"];
            if (objSent != null) { TempData["Empresa"] = null; return View(objSent); }
            
            EmpresaDTO obj = objBL.getEmpresaBasic(getCurrentUser().IdEmpresa);
            if (obj == null) return RedirectToAction("Index");
            return View(obj);
        }