示例#1
0
        public IActionResult update(string id)
        {
            if (!_jurisdictionHelper.Judge("Not"))
            {
                return(Content(_jurisdictionHelper.GetStringUrl("/Home/Index"), "text/html", System.Text.Encoding.UTF8));
            }
            NoticeInfo noticeInfo = new NoticeInfo();

            noticeInfo = _noticeInfoRepository.GetByID(Convert.ToInt32(id));
            return(View(noticeInfo));
        }
示例#2
0
        // GET: SearchController/Delete/5
        public async Task <ActionResult> Delete(string id)
        {
            if (!jurisdictionHelper.Judge("User"))
            {
                return(Content(jurisdictionHelper.GetStringUrl("/Home/Index"), "text /html", System.Text.Encoding.UTF8));
            }
            bool temp = await userInfoRepository.ByIdDel(id);

            if (temp)
            {
                return(Content("<script>alert('删除成功');window.location.href='/Home/Index';</script>", "text/html", System.Text.Encoding.UTF8));
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/Home/Index';</script>", "text/html", System.Text.Encoding.UTF8));
            }
        }