protected void ProblemStatementFilterClear_OnClick(Object sender, EventArgs e)
        {
            foreach (Telerik.Web.UI.RadTreeNode currentNode in ProblemStatementTreeView.GetAllNodes())
            {
                currentNode.Visible = true;

                currentNode.Selected = false;
            }

            return;
        }
        protected void ProblemStatementFilter_OnClick(Object sender, EventArgs e)
        {
            ProblemStatementTreeView.UnselectAllNodes();

            foreach (Telerik.Web.UI.RadTreeNode currentNode in ProblemStatementTreeView.GetAllNodes())
            {
                if (currentNode.Text.ToUpper().Contains(ProblemStatementFilterText.Text.ToUpper()))
                {
                    currentNode.Visible = true;

                    currentNode.Selected = true;

                    RadTreeView_ExpandToNode(currentNode);

                    RadTreeView_MakeVisibleToNode(currentNode);
                }

                else
                {
                    currentNode.Visible = false;
                }
            }

            // SECOND CYCLE THROUGH, MAKE CHILDREN VISIBLE FROM VISIBLE PARENTS

            foreach (Telerik.Web.UI.RadTreeNode currentNode in ProblemStatementTreeView.GetAllNodes())
            {
                if (currentNode.Visible)
                {
                    RadTreeView_MakeChildrenVisibleToNode(currentNode);
                }

                // REMOVE THOSE NODES FROM VIEW THAT HAVE CHILDREN BUT NONE ARE EXPANDED

                if ((!currentNode.Expanded) && (currentNode.Nodes.Count > 0))
                {
                    currentNode.Visible = false;
                }
            }

            return;
        }
        protected Boolean ApplyChanges()
        {
            Boolean isModified = false;

            Boolean success = false;

            List <Int64> problemStatementIds = new List <Int64> (); // PROBLEM STATEMENTS TO ADD

            Int64 problemStatementId = 0;

            Mercury.Server.Application.MemberCaseModificationResponse response;



            // IDENTIFY ALL REQUESTED PROBLEM STATEMENTS TO ADD

            foreach (Telerik.Web.UI.RadTreeNode currentNode in ProblemStatementTreeView.GetAllNodes())
            {
                // VALIDATE THAT THE NODE IS CHECKED AND REQUESTED TO BE ADDED TO CASE

                if (currentNode.Checked)
                {
                    // VALIDATE THAT THE NODE IS A PROBLEM STATEMENT NODE

                    if (Int64.TryParse(currentNode.Value, out problemStatementId))
                    {
                        problemStatementIds.Add(problemStatementId);
                    }
                }
            }


            isModified = (problemStatementIds.Count > 0);

            if (isModified)
            {
                success = true;

                foreach (Int64 currentProblemStatementId in problemStatementIds)
                {
                    // TODO: ADD SINGLE INSTANCE SUPPORT HERE

                    response = MercuryApplication.MemberCase_AddProblemStatement(Case, currentProblemStatementId, false);

                    Case = new Client.Core.Individual.Case.MemberCase(MercuryApplication, response.MemberCase);

                    if (response.HasException)
                    {
                        ExceptionMessage = response.Exception.Message;

                        success = false;

                        // REBUILD TREE AND SET ERROR NODE ACTIVE

                        ProblemStatementTreeView.Nodes.Clear();

                        InitializeProblemStatementTreeView();

                        Telerik.Web.UI.RadTreeNode problemStatementNode = ProblemStatementTreeView.FindNodeByValue(currentProblemStatementId.ToString());

                        if (problemStatementNode != null)
                        {
                            problemStatementNode.Expanded = true;

                            problemStatementNode.ParentNode.Expanded = true;

                            problemStatementNode.ParentNode.ParentNode.Expanded = true;

                            problemStatementNode.Selected = true;
                        }

                        break;
                    }
                }

                if (success)   // IF ALL PROBLEMS WERE ADDED WITHOUT PROBLEMS, REFRESH TREE

                {
                    ProblemStatementTreeView.Nodes.Clear();

                    InitializeProblemStatementTreeView();
                }
            }

            else
            {
                ExceptionMessage = "No Changes Detected";

                success = true;
            }

            return(success);
        }