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); }
/// <summary>インテリア見積りの部屋マスタに対応するデータがあればそれを使う。なければそのまま使う。</summary> public static string GetInteriorRoomNameOrDefault(string roomName) { var interiorHeya = RoomObject.FindInteriorEstimateRoom(roomName); if (interiorHeya != null) { return(interiorHeya.RoomName); } return(roomName); }
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); }
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); }