예제 #1
0
 public bool UpdateArticleCategory(Propaganda_ArticleCategory model)
 {
     if (model != null && model.Id > 0 && !string.IsNullOrEmpty(model.Name))
     {
         if (_db.ExecuteSqlCommand("update Propaganda_ArticleCategory set Name=@Name,Sort=@Sort where Id=@Id", model) > 0)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
 public bool AddArticleCategory(Propaganda_ArticleCategory model)
 {
     if (model != null && !string.IsNullOrEmpty(model.Name))
     {
         if (_db.ExecuteSqlCommand("insert Propaganda_ArticleCategory (Name,Sort) values (@Name,@Sort)", model) > 0)
         {
             return(true);
         }
     }
     return(false);
 }