private void SaveComment(ContestJudgeBLL judge) { ContestCommentBLL comment = new ContestCommentBLL(); comment.Comment = tbxJudgeComment.Text; comment.ContestEntryID = (int)judge.VoteContestEntryID; comment.ContestJudgeID = judge.ContestJudgeID; comment.Save(); }
protected void btnSaveComment_Click(object sender, EventArgs e) { if (Session["ContestJudge"] != null && Request["id"] != null && tbxJudgeComment.Text != string.Empty) { int contestEntryId = 0; int.TryParse(Request["id"], out contestEntryId); if (contestEntryId > 0) { ContestJudgeBLL judge = (ContestJudgeBLL)Session["ContestJudge"]; ContestCommentBLL comment = new ContestCommentBLL(); comment.Comment = tbxJudgeComment.Text; comment.ContestEntryID = contestEntryId; comment.ContestJudgeID = judge.ContestJudgeID; comment.Save(); tbxJudgeComment.Text = string.Empty; LoadPage(); } } }