コード例 #1
0
        public ActionResult DeleteAdminComment(int?id)
        {
            if (id.HasValue)
            {
                var cmt = AdminCommentObject.GetAdminComment(id.Value);
                if (cmt != null)
                {
                    cmt.Delete();
                }
            }

            return(null);
        }
コード例 #2
0
 public void Save()
 {
     if (AdminCommentId.HasValue)
     {
         var cmt = AdminCommentObject.GetAdminComment(AdminCommentId.Value);
         if (cmt != null)
         {
             cmt.Comment   = AdminComment;
             cmt.AdminOnly = AdminOnly;
             cmt.Save();
         }
     }
     else
     {
         AdminCommentId = AdminCommentObject.Add(MainId, AdminComment, AdminOnly);
     }
 }