Пример #1
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));
            }
        }