Пример #1
0
        public static List <RoomLayout> Get(string constructionCode)
        {
            var db = RoomLayout.GetDatabase();

            string sql = @"
                SELECT * FROM RoomLayouts
                WHERE
                    ConstructionCode = '" + constructionCode + @"'
                    AND Floor <> 0";

            return(db.ExecuteQuery <RoomLayout>(sql));
        }
Пример #2
0
        public static List <SiyoHeya> Get(string constructionCode, int siyoCode)
        {
            var rooms = new List <SiyoHeya>();

            if (ConstructionSchedule.IsBeforeProcessRequest(constructionCode))
            {
                var heyas = tbl_siyo_heya.Get(constructionCode, siyoCode);

                foreach (var heya in heyas)
                {
                    var siyoheya = new SiyoHeya();
                    siyoheya.ConstructionCode = heya.customerCode;
                    siyoheya.Floor            = heya.floorNum;
                    siyoheya.RoomCode         = heya.roomCd;
                    siyoheya.RoomName         = heya.roomName;

                    rooms.Add(siyoheya);
                }
            }
            else
            {
                var heyas = RoomLayout.Get(constructionCode);

                foreach (var heya in heyas)
                {
                    var siyoheya = new SiyoHeya();
                    siyoheya.ConstructionCode = heya.ConstructionCode;
                    siyoheya.Floor            = heya.Floor;
                    siyoheya.RoomCode         = heya.RoomCode;
                    siyoheya.RoomName         = heya.RoomName;

                    rooms.Add(siyoheya);
                }
            }

            return(rooms);
        }