public async Task <IActionResult> OnGetAsync(int id)
        {
            if (!base.CheckLogin())
            {
                return(Redirect("/login/index"));
            }


            if (id > 0)
            {
                await Task.Run(() =>
                {
                    //获取信息
                    this.ArticleTagEntity = dal.GetArticleTag(id);
                });

                if (ArticleTagEntity == null)
                {
                    return(RedirectToPage("ArticleTagManagement"));
                }
            }

            return(Page());
        }
示例#2
0
        public int UpdateArticleTag(Base_ArticleTag_Entity entity)
        {
            string sql = "UPDATE Base_ArticleTag SET ArticleTagCode=@ArticleTagCode, ArticleTagName=@ArticleTagName, DelStatus=@DelStatus WHERE Id=@Id;";

            return(connection.Execute(sql, new { ArticleTagName = entity.ArticleTagName, ArticleTagCode = entity.ArticleTagCode, DelStatus = entity.DelStatus, Id = entity.Id }));
        }
示例#3
0
        public int InsertArticleTag(Base_ArticleTag_Entity entity)
        {
            string sql = "INSERT INTO Base_ArticleTag(ArticleTagName, ArticleTagCode,DelStatus ) VALUES(@ArticleTagName,@ArticleTagCode,@DelStatus)";

            return(connection.Execute(sql, new { ArticleTagName = entity.ArticleTagName, ArticleTagCode = entity.ArticleTagCode, DelStatus = entity.DelStatus }));
        }