コード例 #1
0
        /*
         *
         * Komentáře k úkolu
         *
         */

        //Přidání komentáře k úkolu
        public int?AddComment(TaskCommentModel comment)
        {
            comment.TimeChanged = DateTime.Now;
            using (IDbConnection db = new SqlConnection(ConnectionString))
            {
                return(db.Insert(comment));
            }
        }
コード例 #2
0
 //UNUSED
 //Aktualizace úkolu
 public int?UpdateComment(TaskCommentModel comment)
 {
     using (IDbConnection db = new SqlConnection(ConnectionString))
     {
         string query  = @"update tbTaskComment SET content = @content, timechanged = @timechanged where Id = @cmntId";
         var    result = db.Execute(query, new
         {
             content     = comment.Content,
             timechanged = comment.TimeChanged,
             cmntId      = comment.Id
         });
         return(result);
     }
 }