Beispiel #1
0
        public static string GetRoomCodeInSiyo(RoomObject room, string roomName, List <SiyoHeya> siyoHeyas)
        {
            if (room != null)
            {
                var roomCode = XData.Room.GetRoomCode(room.ObjectId);
                if (!string.IsNullOrEmpty(roomCode))
                {
                    return(roomCode);
                }
            }

            var siyoHeya = RoomObject.FindSiyoHeya(roomName, siyoHeyas);

            if (siyoHeya != null)
            {
                return(siyoHeya.RoomCode);
            }

            var interiorHeya = RoomObject.FindInteriorEstimateRoom(roomName);

            if (interiorHeya != null)
            {
                return(interiorHeya.RoomCode);
            }

            return(null);
        }
Beispiel #2
0
        public static string GetRoomNameInSiyo(string roomName, List <SiyoHeya> siyoHeyas)
        {
            var siyoHeya = RoomObject.FindSiyoHeya(roomName, siyoHeyas);

            if (siyoHeya != null)
            {
                return(siyoHeya.RoomName);
            }

            var interiorHeya = RoomObject.FindInteriorEstimateRoom(roomName);

            if (interiorHeya != null)
            {
                return(interiorHeya.RoomName);
            }

            return(null);
        }
Beispiel #3
0
        public static string GetRoomCodeInSiyo(string roomName, int floor, List <SiyoHeya> siyoHeyas)
        {
            var siyoHeyasFloor = siyoHeyas.FindAll(p => p.Floor == floor);
            var siyoHeya       = RoomObject.FindSiyoHeya(roomName, siyoHeyasFloor);

            if (siyoHeya != null)
            {
                return(siyoHeya.RoomCode);
            }

            var interiorHeya = RoomObject.FindInteriorEstimateRoom(roomName);

            if (interiorHeya != null)
            {
                return(interiorHeya.RoomCode);
            }

            return(null);
        }