Пример #1
0
 public ShopRegisterFragment(DbHelper DAO, Pavilion pavilion)
 {
     this.DAO       = DAO;
     shopRepository = DAO.CreateRepository <Shop>(null) as IShopRepository;
     pavilionRepository
                   = DAO.CreateRepository <Pavilion>(pavilion.FloorId) as IPavilionRepository;
     this.pavilion = pavilion;
 }
Пример #2
0
        public AddPavilionToShopDialogFragment(DbHelper DAO, Pavilion pavilion)
        {
            pavilionRepository = DAO.CreateRepository <Pavilion>(pavilion.FloorId) as IPavilionRepository;
            shopRepository     = DAO.CreateRepository <Shop>(null) as IShopRepository;

            pavilionToUpdate = pavilion;
            shopToUpdate     = shopRepository.GetShopByPavilion(pavilion);
        }
Пример #3
0
 public PavilionAdapter(DbHelper DAO, int floorId, string searchQuery)
 {
     pavilionRepository = DAO.CreateRepository <Pavilion>(floorId) as IPavilionRepository;
     shopRepository     = DAO.CreateRepository <Shop>(null) as IShopRepository;
     userRepository     = DAO.CreateRepository <User>(null) as IUserRepository;
     user = DAO.User;
     if (searchQuery == "" || searchQuery == null)
     {
         Log.Info(tag, "without search");
         pavilions = pavilionRepository.GetArray();
     }
     else
     {
         Log.Info(tag, "with search");
         pavilions = pavilionRepository.Search(searchQuery).ToArray();
     }
 }