protected void lbSave_PhoneNumber_Click(object sender, EventArgs e)
        {
            this.CurrentMember.MobilePhoneNumber = txtPhoneNumber.Text.Replace("-", string.Empty);

            var membershipmManager = new MembershipManager();
            membershipmManager.UpdateMember(this.CurrentMember);

            Response.Redirect(Request.Url.ToString());
        }
        protected void NextButton_Click(object sender, EventArgs e)
        {
            var child = new Child();

            if ((uxBoy1.Checked || uxGirl1.Checked) && uxSelectGrade1.SelectedValue != string.Empty)
            {
                child.Grades.Add(new Grade() { Key = Constants.GradesByValue[uxSelectGrade1.SelectedValue] });
                child.Gender = uxBoy1.Checked ? "boy" : "girl";
                //CurrentMember.Children.Add(child);
            }
            
            var issues = new List<Issue>();

            if (q1a1.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(0).Key, Value = Constants.Issues.ElementAt(0).Value }); }
            if (q1a2.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(1).Key, Value = Constants.Issues.ElementAt(1).Value }); }
            if (q1a3.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(2).Key, Value = Constants.Issues.ElementAt(2).Value }); }
            if (q1a4.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(3).Key, Value = Constants.Issues.ElementAt(3).Value }); }
            if (q1a5.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(4).Key, Value = Constants.Issues.ElementAt(4).Value }); }
            if (q1a6.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(5).Key, Value = Constants.Issues.ElementAt(5).Value }); }
            if (q1a7.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(6).Key, Value = Constants.Issues.ElementAt(6).Value }); }
            if (q1a8.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(7).Key, Value = Constants.Issues.ElementAt(7).Value }); }
            if (q1a9.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(8).Key, Value = Constants.Issues.ElementAt(8).Value }); }
            if (q1a10.Checked) { issues.Add(new Issue() { Key = Constants.Issues.ElementAt(9).Key, Value = Constants.Issues.ElementAt(9).Value }); }

            child.Issues = issues;
            child.Nickname = ScreenNameTextBox.Text;
            // handle redirects
            if (!q2a1.Checked) // Has (child) been formally evauluated for ...
            {
                //BG: Set alternative child evaulation status
                if (q2a2.Checked)//BG: Child has not been evaluated
                {
                    child.EvaluationStatus = new Guid(Constants.ChildEvaluation.StatusEvaluationNo);
                }
                else if (q2a3.Checked)//BG: Child evaluation is in progress
                {
                    child.EvaluationStatus = new Guid(Constants.ChildEvaluation.StatusEvaluationInProgress);
                }
            }
            else
            {
                child.EvaluationStatus = new Guid(Constants.ChildEvaluation.StatusEvaluationYes);

                if (uxIEPStatus.SelectedValue != string.Empty)
                {
                    child.IEPStatus = Guid.Parse(uxIEPStatus.SelectedValue);
                }

                if (ux504Status.SelectedValue != string.Empty)
                {
                    child.Section504Status = Guid.Parse(ux504Status.SelectedValue);
                }

                foreach (var item in uxLeftList.Items)
                {
                    var check = item.FindControl("diagnosis") as CheckBox;
                    if (check != null && check.Checked)
                    {
                        child.Diagnoses.Add(new Domain.Membership.Diagnosis() { Key = Guid.Parse(check.Attributes["guid"]) });
                    }
                }

                foreach (var item in uxRightList.Items)
                {
                    var check = item.FindControl("diagnosis") as CheckBox;
                    if (check != null && check.Checked)
                    {
                        child.Diagnoses.Add(new Domain.Membership.Diagnosis() { Key = Guid.Parse(check.Attributes["guid"]) });
                    }
                }
            }

            CurrentMember.Children.Add(child);
            
            var membershipManager = new MembershipManager();

            membershipManager.UpdateMember(CurrentMember);

            Response.Redirect(MyProfileItem.GetMyProfilePage().InnerItem.GetUrl());
        }
        private void updateMember()
        {
            var membershipManager = new MembershipManager();

            try
            {
                //set current user/member
                this.CurrentMember = membershipManager.UpdateMember(this.registeringUser);

                if (mode != Constants.QueryStrings.Registration.ModeEdit)
                {
                    this.CurrentUser = membershipManager.GetUser(this.CurrentMember.MemberId);


                    //SalesforceManager sfMgr = new SalesforceManager("*****@*****.**",
                    //                                                 "8f9C3Ayq",
                    //                                                 "hlY0jOIILtogz3sQlLUtmERlu");

                    SalesforceManager sfMgr = new SalesforceManager(Constants.SALESFORCE_USERNAME,
                                                                    Constants.SALESFORCE_PASSWORD,
                                                                    Constants.SALESFORCE_TOKEN);
                    if (sfMgr.LoggedIn)
                    {
                        try
                        {
                            SalesforceActionResult result = sfMgr.CreateWebsiteMemberAsContact(this.CurrentMember, CurrentUser.Email);
                            if (result.Success == false)
                            {
                                Response.Write("<!-- Error 401 -->");
                            }
                        }
                        catch (Exception)
                        {
                            Response.Write("<!-- Error 501 -->");
                        }
                    }
                    else
                    {
                        Response.Write("<!-- Error 601 -->");
                    }
                    
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }