protected void InsertCPOpportunity(int RoleAlignment, int iCharacterID, int iEventID, int iRegistrationID, string PointsFrom) { int iReasonID = 0; switch (ddlRoles.SelectedItem.Text) { case "PC": iReasonID = 3; break; case "NPC": iReasonID = 1; break; case "Staff": RoleAlignment = 12; break; default: break; } Classes.cPoints cPoints = new Classes.cPoints(); cPoints.CreateRegistrationCPOpportunity(Master.UserID, Master.CampaignID, RoleAlignment, iCharacterID, iReasonID, iEventID, iRegistrationID, PointsFrom); }
protected void InsertCPOpportunity(int RoleAlignment, int iCharacterID, int iEventID, int iRegistrationID) { int iCampaignID = 0; int iUserID = 0; if (Session["UserID"] != null) { int.TryParse(Session["UserID"].ToString(), out iUserID); } if (Session["CampaignID"] != null) { int.TryParse(Session["CampaignID"].ToString(), out iCampaignID); } int iReasonID = 0; switch (ddlRoles.SelectedItem.Text) { case "PC": iReasonID = 3; break; case "NPC": iReasonID = 1; break; case "Staff": RoleAlignment = 12; break; default: break; } Classes.cPoints cPoints = new Classes.cPoints(); // Currently have no need to delete. The Opportunty should be there currently. Leaving in case we need it. // cPoints.DeleteRegistrationCPOpportunity(iUserID, iRegistrationID); cPoints.CreateRegistrationCPOpportunity(iUserID, iCampaignID, RoleAlignment, iCharacterID, iReasonID, iEventID, iRegistrationID); }
protected void btnRunTest_Click(object sender, EventArgs e) { // Procedure to test - Change variable types accordingly //Test CP Opportunity Add from registration //int UserID, int CampaignID, int RoleAlignment, int CharacterID, int ReasonID, int EventID, int RegistrationID int Value01 = 0; Int32.TryParse(Session["UserID"].ToString(), out Value01); int Value02 = 0; Int32.TryParse(txtValue02.Text, out Value02); int Value03 = 0; Int32.TryParse(txtValue03.Text, out Value03); int Value04 = 0; Int32.TryParse(txtValue04.Text, out Value04); int Value05 = 0; Int32.TryParse(txtValue05.Text, out Value05); int Value06 = 0; Int32.TryParse(txtValue06.Text, out Value06); int Value07 = 0; Int32.TryParse(txtValue07.Text, out Value07); string Value08 = txtValue08.Text; string Value09 = txtValue09.Text; string Value10 = txtValue10.Text; string Value11 = txtValue11.Text; string Value12 = txtValue12.Text; string Value13 = txtValue13.Text; string Value14 = txtValue14.Text; string Value15 = txtValue15.Text; Classes.cPoints Points = new Classes.cPoints(); Points.CreateRegistrationCPOpportunity(Value01, Value02, Value03, Value04, Value05, Value06, Value07); }