Пример #1
0
 public void Update(Model.CMS.Tag entity)
 {
     entity.LastTime = DateTime.Now;
     using (IDbConnection conn = SqlString.GetSqlConnection())
     {
         conn.Execute("UPDATE cms_tag SET TagName=@TagName,TagDes=@TagDes,LastTime=@LastTime WHERE Tag_Id =@Tag_Id", entity);
     }
 }
Пример #2
0
 public bool Insert(Model.CMS.Tag entity)
 {
     entity.LastTime = DateTime.Now;
     using (IDbConnection conn = SqlString.GetSqlConnection())
     {
         int i = conn.Execute("INSERT INTO cms_tag(TagName,TagDes,LastTime,CreateTime)" +
                              "VALUES(@TagName,@TagDes,@LastTime,@CreateTime)", entity);
         if (i > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }