Example #1
0
        /// <summary>
        /// 删除草稿模板
        /// </summary>
        /// <param name="caseid"></param>
        /// <param name="username"></param>
        /// <returns></returns>
        public ActionResult deletedraft(int caseid, string username)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(View("index"));
            }
            UserInfo user      = new UserInfo();
            string   username2 = User.Identity.Name;
            string   userid    = user.GetUseByName(username2).Id;

            if (username == username2)
            {
                CaseInfo dbcase = new CaseInfo();
                var      result = dbcase.DeleteCaseById(caseid);
                if (result == 1)
                {
                    return(Redirect("/home/person?userid=" + userid));
                }
            }
            return(View("index"));
        }