private void LoadRTSAttributes(ConfigDB db)
        {
            _rtsAttributes = new Dictionary <int, Dictionary <string, List <RTSAttribute> > >();
            DataTable dt = db.LoadRTSAttributes();

            foreach (DataRow dr in dt.Rows)
            {
                //initialize to empty string by default for error message below
                int      projectID      = Utility.Value(dr["_fk_ProjectID"], -1);
                string   groupName      = Utility.Value(dr["GroupName"], "");
                string   context        = Utility.Value(dr["Context"], "");
                string   contextDateStr = Utility.Value(dr["ContextDate"], null);
                DateTime?contextDate    = null;
                if (!string.IsNullOrEmpty(contextDateStr))
                {
                    contextDate = Convert.ToDateTime(contextDateStr);
                }
                bool   decrypt      = Utility.Value(dr["Decrypt"], false);
                string xmlName      = Utility.Value(dr["XMLName"], "");
                string entityType   = Utility.Value(dr["EntityType"], "");
                string relationship = Utility.Value(dr["Relationship"], "");
                string fieldName    = Utility.Value(dr["FieldName"], "");
                bool   fetch        = Utility.Value(dr["FetchIfNotInXml"], true);

                if (!_rtsAttributes.ContainsKey(projectID))
                {
                    _rtsAttributes.Add(projectID, new Dictionary <string, List <RTSAttribute> >(StringComparer.InvariantCultureIgnoreCase));
                }

                Dictionary <string, List <RTSAttribute> > projectSet = _rtsAttributes[projectID];

                if (!projectSet.ContainsKey(groupName))
                {
                    projectSet.Add(groupName, new List <RTSAttribute>());
                }

                List <RTSAttribute> group  = projectSet[groupName];
                RTSAttribute        newAtt = new RTSAttribute(projectID, groupName, context, contextDate, decrypt, xmlName, entityType, relationship, fieldName, fetch);
                group.Add(newAtt);
            }
        }