예제 #1
0
        /*
         *
         * Komentáře k bugu
         *
         */

        //Přidání komentáře k bugu
        public int?AddCommentBug(BugCommentModel comment)
        {
            comment.TimeChanged = DateTime.Now;
            using (IDbConnection db = new SqlConnection(ConnectionString))
            {
                return(db.Insert(comment));
            }
        }
예제 #2
0
 //UNUSED
 //Aktualizace komentáře u bugu
 public int?UpdateCommentBug(BugCommentModel comment)
 {
     using (IDbConnection db = new SqlConnection(ConnectionString))
     {
         string query  = @"update tbBugComment 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);
     }
 }