protected void btnDeleteAffil_Click(object sender, EventArgs e) { int iDeleteAffilID; if (int.TryParse(hidDeleteAffilID.Value, out iDeleteAffilID)) { cPlayerAffiliation PlayerAffil = new cPlayerAffiliation(iDeleteAffilID, _UserName, _UserID); PlayerAffil.RecordStatus = RecordStatuses.Delete; PlayerAffil.Delete(_UserName, _UserID); lblModalMessage.Text = "Your affiliation has been deleted."; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModalMessage();", true); } }
protected void btnSaveAffiliation_Click(object sender, EventArgs e) { int iPlayerAffilID; int iPlayerProfileID; if ((int.TryParse(hidPlayerAffilID.Value, out iPlayerAffilID)) && (int.TryParse(hidPlayerProfileID.Value, out iPlayerProfileID))) { Classes.cPlayerAffiliation PlayerAffil = new cPlayerAffiliation(iPlayerAffilID, _UserName, _UserID); PlayerAffil.AffiliationName = tbAffiliationName.Text; PlayerAffil.AffiliationRole = tbAffiliationRole.Text; PlayerAffil.PlayerComments = tbAffiliationComments.Text; PlayerAffil.PlayerProfileID = iPlayerProfileID; PlayerAffil.Save(_UserName, _UserID); } }