public async Task <ActionResult> SchoolLeaderDetail(int id)
        {
            var webContent = await _webContentDal.QueryByIdAsync(id);

            webContent.WebContentType = await _webContentTypeDal.QueryByIdAsync(webContent.WebContentTypeId);

            return(View(webContent));
        }
Beispiel #2
0
        // GET: Admin/WebContents/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WebContent webContent = await _webContentDal.QueryByIdAsync(id);

            if (webContent == null)
            {
                return(HttpNotFound());
            }
            webContent.WebContentType = await _webContentTypeDal.QueryByIdAsync(webContent.WebContentTypeId);

            return(View(webContent));
        }
        // GET: Admin/WebContentTypes/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WebContentType webContentType = await _webContentTypeDal.QueryByIdAsync(id);

            if (webContentType == null)
            {
                return(HttpNotFound());
            }
            webContentType.MenuType     = WebContentManage.QueryMenuTypeById(webContentType.MenuTypeId); // await _menuTypeDal.QueryByIdAsync(webContentType.MenuTypeId);
            webContentType.MenuTypeList = WebContentManage.QueryMenuTypes();                             // await _menuTypeDal.QueryAllAsync();
            return(View(webContentType));
        }
        // GET: WebContents/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }
            var webContent = await _webContentDal.QueryByIdAsync(id);

            webContent.WebContentType = await _webContentTypeDal.QueryByIdAsync(webContent.WebContentTypeId);

            return(View(webContent));
        }