public HomeFragment() { this.RetainInstance = true; _catalogDataService = new CatalogDataService(); _connection = new ConnectionService(); baseService = new BaseService(); }
/// <summary> /// Initializes a new instance for the <see cref="DetailPageViewModel" /> class. /// </summary> public DetailPageViewModel(string callerPage, ICatalogDataService catalogDataService, ICartDataService cartDataService, IWishlistDataService wishlistDataService, Product selectedProduct) { this.catalogDataService = catalogDataService; this.cartDataService = cartDataService; this.wishlistDataService = wishlistDataService; this.selectedProduct = selectedProduct; Device.BeginInvokeOnMainThread(() => { AddRecentProduct(selectedProduct.ID.ToString()); FetchProduct(selectedProduct.ID.ToString()); UpdateCartItemCount(); }); AddFavouriteCommand = new DelegateCommand(AddFavouriteClicked); NotificationCommand = new DelegateCommand(NotificationClicked); AddToCartCommand = new DelegateCommand(AddToCartClicked); LoadMoreCommand = new DelegateCommand(LoadMoreClicked); ShareCommand = new DelegateCommand(ShareClicked); VariantCommand = new DelegateCommand(VariantClicked); CardItemCommand = new DelegateCommand(CartClicked); BackButtonCommand = new DelegateCommand(BackButtonClicked); MessagingCenter.Subscribe <RecorderViewModel, PredictionData>(this, callerPage, MessageCenterSubmitAsync); }
public ProductDetailsViewModel( ICatalogDataService catalogDataService ) { _catalogDataService = catalogDataService; Promotions = new ObservableCollection <PromotionModel>(); }
public PieCatalogViewModel(IConnectionService connectionService, INavigationService navigationService, IDialogService dialogService, ICatalogDataService catalogDataService) : base(connectionService, navigationService, dialogService) { _catalogDataService = catalogDataService; }
public ShoppingCartViewModel( ICatalogDataService catalogDataService, IOrderDataService orderDataService ) { _catalogDataService = catalogDataService; _orderDataService = orderDataService; }
public AddPromotionViewModel( ICatalogDataService catalogDataService, INotificationService notificationService ) { _catalogDataService = catalogDataService; _notificationService = notificationService; }
public CategoriesFragment(int v1, string v2) { this.v1 = v1; this.v2 = v2; _catalogDataService = new CatalogDataService(); _connection = new ConnectionService(); baseService = new BaseService(); }
public HomeViewModel(IConnectionService connectionService, INavigationService navigationService, IDialogService dialogService, ICatalogDataService catalogDataService) : base(connectionService, navigationService, dialogService) { _catalogDataService = catalogDataService; ProductsOfTheWeek = new ObservableCollection <Product>(); }
public LoginPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService, ICatalogDataService catalogDataService) { _navigationService = navigationService; _pageDialogService = pageDialogService; _catalogDataService = catalogDataService; if (_isRemebered) { ExecuteOnLoginCommand(); } }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(ICatalogDataService catalogDataService) { AddItemToBasketCommand = new RelayCommand(AddItemToBasketMethod); MoveLeftCommand = new RelayCommand(MoveLeftMethod); MoveRightCommand = new RelayCommand(MoveRightMethod); _catalogItems = catalogDataService.GetAllCatalogItems(); _maxIndex = _catalogItems.Count - 1; SelectFirstFromCatalog(); }
/// <summary> /// Initializes a new instance for the <see cref="CatalogPageViewModel" /> class. /// </summary> public CatalogPageViewModel(ICatalogDataService catalogDataService, ICartDataService cartDataService, IWishlistDataService wishlistDataService, string selectedCategory) { this.catalogDataService = catalogDataService; this.cartDataService = cartDataService; this.wishlistDataService = wishlistDataService; Device.BeginInvokeOnMainThread(() => { UpdateCartItemCount(); FetchProducts(selectedCategory); }); }
public HomeViewModel(IConnectionService connectionService, INavigationService navigationService, IDialogService dialogService, ICatalogDataService catalogDataService, ISettingsService settingsService) : base(connectionService, navigationService, dialogService) { _catalogDataService = catalogDataService; _settingsService = settingsService; PiesOfTheWeek = new ObservableCollection <Pie>(); MessagingCenter.Subscribe <PieCatalogViewModel>(this, "Pies_added", refreshpie); //initialise(); }
public HomeViewModel( IConnectionService connectionService, INavigationService navigationService, IDialogService dialogService, ICatalogDataService catalogDataService) { _connectionService = connectionService; _navigationService = navigationService; _dialogService = dialogService; _catalogDataService = catalogDataService; PiesOfTheWeak = new ObservableCollection <Pie>(); }
/// <summary> /// Initializes a new instance for the <see cref="CatalogPageViewModel" /> class. /// </summary> public CatalogPageViewModel(string callerPage, ICatalogDataService catalogDataService, ICartDataService cartDataService, IWishlistDataService wishlistDataService, string selectedCategory) { this.catalogDataService = catalogDataService; this.cartDataService = cartDataService; this.wishlistDataService = wishlistDataService; Device.BeginInvokeOnMainThread(() => { UpdateCartItemCount(); FetchProducts(selectedCategory); }); MessagingCenter.Subscribe <RecorderViewModel, PredictionData>(this, callerPage, MessageCenterSubmitAsync); }
public ProductHomePageViewModel(IProductHomeDataService productHomeDataService, ICatalogDataService catalogDataService) { this.productHomeDataService = productHomeDataService; this.catalogDataService = catalogDataService; Device.BeginInvokeOnMainThread(() => { FetchBannerImage(); FetchOfferProducts(); FetchRecentProducts(); }); //this.itemSelectedCommand = new DelegateCommand(this.ItemSelected); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); _catalogDataService = new CatalogDataService(); _connection = new ConnectionService(); baseService = new BaseService(); var idCategoria = base.Intent.Extras.GetInt("id", -1); var nameCategoria = base.Intent.Extras.GetString("title"); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbarPrincipal); base.SetSupportActionBar(toolbar); SupportActionBar.SetDisplayHomeAsUpEnabled(true); this.Title = nameCategoria; SupportActionBar.Title = Title; GetProductListCategory(idCategoria, nameCategoria); GetProductListCategoryByRecicle(idCategoria, nameCategoria); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); _catalogDataService = new CatalogDataService(); _connection = new ConnectionService(); baseService = new BaseService(); list = FindViewById <ListView>(Resource.Id.List); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbarPrincipal); base.SetSupportActionBar(toolbar); SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetTitle(Resource.String.carrinho); LoadListCart(); // Create your application here }
protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); _catalogDataService = new CatalogDataService(); _connection = new ConnectionService(); baseService = new BaseService(); var idProduct = base.Intent.Extras.GetInt("id", -1); var nameProduct = base.Intent.Extras.GetString("name"); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbarPrincipal); base.SetSupportActionBar(toolbar); SupportActionBar.SetDisplayHomeAsUpEnabled(true); this.Title = nameProduct; SupportActionBar.Title = Title; //reciclerView na HomeDetail Layout mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView); mLayoutManager = new LinearLayoutManager(this); mRecyclerView.SetLayoutManager(mLayoutManager); LoadDetailProduct(idProduct, nameProduct); }
/// <summary> /// Initializes a new instance for the <see cref="CheckoutPageViewModel" /> class. /// </summary> public CheckoutPageViewModel(IUserDataService userDataService, ICartDataService cartDataService, ICatalogDataService catalogDataService, IMyOrdersDataService myOrdersDataService = null) { this.userDataService = userDataService; this.cartDataService = cartDataService; this.catalogDataService = catalogDataService; DeliveryAddress = new ObservableCollection <Customer>(); PaymentModes = new ObservableCollection <Payment>(); Device.BeginInvokeOnMainThread(() => { FetchAddresses(); FetchPaymentOptions(); FetchCartList(); }); EditCommand = new DelegateCommand(EditClicked); AddAddressCommand = new DelegateCommand(AddAddressClicked); PlaceOrderCommand = new DelegateCommand(PlaceOrderClicked); PaymentOptionCommand = new DelegateCommand(PaymentOptionClicked); ApplyCouponCommand = new DelegateCommand(ApplyCouponClicked); }
/// <summary> /// Initializes a new instance for the <see cref="DetailPageViewModel" /> class. /// </summary> public DetailPageViewModel(ICatalogDataService catalogDataService, ICartDataService cartDataService, IWishlistDataService wishlistDataService, Product selectedProduct) { this.catalogDataService = catalogDataService; this.cartDataService = cartDataService; this.wishlistDataService = wishlistDataService; this.selectedProduct = selectedProduct; Device.BeginInvokeOnMainThread(() => { AddRecentProduct(selectedProduct.ID.ToString()); FetchProduct(selectedProduct.ID.ToString()); UpdateCartItemCount(); }); AddFavouriteCommand = new DelegateCommand(AddFavouriteClicked); NotificationCommand = new DelegateCommand(NotificationClicked); AddToCartCommand = new DelegateCommand(AddToCartClicked); LoadMoreCommand = new DelegateCommand(LoadMoreClicked); ShareCommand = new DelegateCommand(ShareClicked); VariantCommand = new DelegateCommand(VariantClicked); CardItemCommand = new DelegateCommand(CartClicked); BackButtonCommand = new DelegateCommand(BackButtonClicked); }
/// <summary> /// Initializes a new instance for the <see cref="CheckoutPageViewModel" /> class. /// </summary> public CheckoutPageViewModel(string callerPage, IUserDataService userDataService, ICartDataService cartDataService, ICatalogDataService catalogDataService, IMyOrdersDataService myOrdersDataService = null) { this.userDataService = userDataService; this.cartDataService = cartDataService; this.catalogDataService = catalogDataService; DeliveryAddress = new ObservableCollection <Customer>(); PaymentModes = new ObservableCollection <Payment>(); Device.BeginInvokeOnMainThread(() => { FetchAddresses(); FetchPaymentOptions(); FetchCartList(); }); EditCommand = new DelegateCommand(EditClicked); AddAddressCommand = new DelegateCommand(AddAddressClicked); PlaceOrderCommand = new DelegateCommand(PlaceOrderClicked); PaymentOptionCommand = new DelegateCommand(PaymentOptionClicked); ApplyCouponCommand = new DelegateCommand(ApplyCouponClicked); MessagingCenter.Subscribe <RecorderViewModel, PredictionData>(this, callerPage, MessageCenterSubmitAsync); }
public CardPaymentViewModel(IConnectionService connectionService, INavigationService navigationService, IDialogService dialogService, ICatalogDataService catalogDataService) : base(connectionService, navigationService, dialogService) { }
public CatalogDataServiceUnitTest() { _mockCatalogDataService = new Mock <ICatalogDataService>(); _catalogDataService = new CatalogDataService(); }
public void SetUp() { catalogDataService = MockRepository.GenerateMock<ICatalogDataService>(); catalogService = new CatalogService(catalogDataService); }
public CatalogService(ICatalogDataService catalogDataService = null) { if (catalogDataService == null) catalogDataService = DAOFactoryMethod.CurrentDAOFactory.CatalogDataService; this.catalogDataService = catalogDataService; }