protected void btnSaveComments_Click(object sender, EventArgs e) { int iPlayerWaiverID; if (int.TryParse(hidPlayerWaiverID.Value, out iPlayerWaiverID)) { Classes.cPlayerWaiver Waiver = new Classes.cPlayerWaiver(iPlayerWaiverID, Master.UserName); Waiver.PlayerNotes = tbWaiverComment.Text; Waiver.AcceptedDate = null; Waiver.DeclinedDate = null; if (cbxAgree.Checked) { Waiver.AcceptedDate = DateTime.Today; } else if (cbxDisagree.Checked) { Waiver.DeclinedDate = DateTime.Today; } Waiver.Save(Master.UserName, Master.UserID); } lblModalMessage.Text = "Your information has been saved."; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModalMessage();", true); }