コード例 #1
0
        public void OnGet(string id)
        {
            // Fetch selected house
            var house = _houseRepository.Read(id);

            this.House         = new ViewModels.HouseViewModel(house);
            this.StageList     = _stageRepository.List(house);
            this.stageNameList = new List <string>();
            //stageNameList = this.StageList;

            for (int i = 0; i < this.StageList.Count; i++)
            {
                if (!this.stageNameList.Contains(this.StageList[i].StageName))
                {
                    this.stageNameList.Add(this.StageList[i].StageName);
                }
            }

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }
コード例 #2
0
        public void OnPostDelete(string id, string imageid)
        {
            this._imageRepository.Delete(new Image {
                Id = new Guid(imageid)
            });

            var house = _houseRepository.Read(id);

            this.House     = new ViewModels.HouseViewModel(house);
            this.StageList = _stageRepository.List(house);

            this.stageNameList = new List <string>();
            for (int i = 0; i < this.StageList.Count; i++)
            {
                if (!this.stageNameList.Contains(this.StageList[i].StageName))
                {
                    this.stageNameList.Add(this.StageList[i].StageName);
                }
            }

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }
コード例 #3
0
        public void OnGet(string id)
        {
            // Fetch selected house
            var house = _houseRepository.Read(id);

            this.House     = new ViewModels.HouseViewModel(house);
            this.StageList = _stageRepository.List(house);

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }
コード例 #4
0
        public void OnPostDelete(string id, string imageid)
        {
            this._imageRepository.Delete(new Image {
                Id = new Guid(imageid)
            });

            var house = _houseRepository.Read(id);

            this.House     = new ViewModels.HouseViewModel(house);
            this.StageList = _stageRepository.List(house);

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }