Beispiel #1
0
        private IEnumerable <IAssociationOption> GetRoom(string location, string building, string floor)
        {
            var dto = new SearchRequestDto();

            dto.AppendSearchEntry("LOCATION", building + "/FL:" + floor + "/RO:%");
            return(BuildingFloorRoomManager.DoGetLocation(location, dto, dict => {
                var rawValue = (String)dict["location"];
                //TODO: fix label
                return new AssociationOption(rawValue, rawValue.Split(new[] { "RO:" }, StringSplitOptions.None)[1]);
            }));
        }
Beispiel #2
0
        private IEnumerable <IAssociationOption> GetFloor(string location, string building)
        {
            var dto = new SearchRequestDto();

            dto.AppendSearchEntry("LOCATION", building + "/FL:%");
            dto.AppendProjectionField(new ProjectionField("location", String.Format("DISTINCT SUBSTR(REPLACE(location.Location,'{0}',''),1,LOCATE('/',REPLACE(location.Location,'{0}',''))-1)", building + "/FL:")));
            dto.SearchSort      = "location";
            dto.ExpressionSort  = true;
            dto.SearchAscending = true;
            return(BuildingFloorRoomManager.DoGetLocation(location, dto, dict => {
                var rawValue = (String)dict["location"];
                return new AssociationOption(rawValue, rawValue);
            }));
        }
Beispiel #3
0
        private IEnumerable <IAssociationOption> GetBuilding(string location)
        {
            var dto = new SearchRequestDto();

            dto.AppendSearchEntry("CLASSSTRUCTUREID", "BUILDING");
            dto.AppendProjectionField(ProjectionField.Default("description"));
            dto.AppendProjectionField(ProjectionField.Default("location"));
            return(BuildingFloorRoomManager.DoGetLocation(location, dto, dict => {
                var rawLabel = (String)dict["description"];
                var rawValue = (String)dict["location"];
                //TODO: fix label
                return new AssociationOption(rawValue.Split('/')[0], rawLabel);
            }));
        }