public ActionResult DeleteAdminComment(int?id) { if (id.HasValue) { var cmt = AdminCommentObject.GetAdminComment(id.Value); if (cmt != null) { cmt.Delete(); } } return(null); }
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); } }