Exemple #1
0
 public AddFlowerViewModel()
 {
     flowerTypeRepository = new FlowerTypeRepository();
     flowerRepository     = new FlowerRepository();
     flowerTypes          = flowerTypeRepository.Gets();
     flowers    = flowerRepository.Gets();
     flowerType = new FlowerType();
     flower     = new Flower();
     AddFlower  = new Command(Insert);
 }
Exemple #2
0
 void GetFlowersByTypeId()
 {
     if (SelectedFlowerType != null && SelectedFlowerType.Id > 0)
     {
         Flowers = flowerRepository.GetsByTypeId(SelectedFlowerType.Id);
     }
     else
     {
         Flowers = flowerRepository.Gets();
     }
 }
Exemple #3
0
        public ViewResult Index()
        {
            var flowers = flowerRepository.Gets();

            return(View(flowers));
        }