public MyStoresViewModel(IStoreDataStore storeData) { var data = storeData.GetAll(); MyStores = new ObservableCollection <Store>(data); SwipeDeleteCommand = new Command <CommandEventData>(async(data) => { var eventArgs = data.Args as Syncfusion.ListView.XForms.SwipeEndedEventArgs; var selectedstore = eventArgs.ItemData as Store; var featureitemdata = storeData.GetFeaturedItemsOfStore(selectedstore.Id); if (eventArgs.SwipeDirection == Syncfusion.ListView.XForms.SwipeDirection.Right) { if (eventArgs.SwipeOffset >= 100) { if (selectedstore != null) { //App.Store = selectedstore; App.ApplicationManager.CurrenstStoreGuid = selectedstore.Id; await Shell.Current.GoToAsync($"{AdminHomePage.Route}"); // App.Store.FeaturedItems = new List<StoreFeaturedItem>(featureitemdata); // await Shell.Current.Navigation.PushAsync(new AdminHomePage()); } } } }); }
public EmployeeController(IEmployeeDataStore employeeData, IUserDataStore userData, IStoreDataStore storeData, IEmployeeWorkHourDataStore employeeWorkHourData) { employeeDataStore = employeeData; userDataStore = userData; storeDataStore = storeData; employeeWorkHourDataStore = employeeWorkHourData; }
public RegisterStoreViewModel(IValidatableObjectFactory validatableObjectFactory, IUserDataStore userDataStore, IStoreDataStore storeDataStore, IStoreFactory storeFactory, IUserFactory userFactory, IRegisterCardViewModel cardViewModel, IStoreRegistrationEntry storeRegistrationEntry) { _validatableObjectFactory = validatableObjectFactory; _UserDataStore = userDataStore; _StoreDataStore = storeDataStore; _StoreFactory = storeFactory; _UserFactory = userFactory; CardViewModel = cardViewModel; StoreRegistrationEntry = storeRegistrationEntry; StoreName = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Store 1"); CardNumber = _validatableObjectFactory.CreateSimpleValidatebleObject <string>(); Longitude = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("1"); Latitude = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("2"); StoreOwnerName = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Owner 1"); Description = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Description"); Category = _validatableObjectFactory.CreateSimpleValidatebleObject <string>("Category"); StoreNameValidationCommand = new Command(() => StoreName.Validate()); LongitudeValidationCommand = new Command(() => Longitude.Validate()); LatitudeValidationCommand = new Command(() => Latitude.Validate()); StoreOwnerNameValidationCommand = new Command(() => StoreOwnerName.Validate()); MoreInfoCommand = new Command <CommandEventData>((commandData) => MoreInfoPopup(commandData)); RegisterStoreCommand = new Command <CommandEventData>(async(data) => await NavigateToInventoryProductItem(data)); DescriptionValidationCommand = new Command(() => Description.Validate()); GetLogoPhotoCommand = new Command(async() => ProductImageSource = await Utils.PickPhoto()); TakeLogoPhotoCommand = new Command(() => { }); GetLocationCommand = new Command(async() => await GetLocation()); TypeOfCardChangedCommand = new Command <CommandEventData>((data) => TypeOfCardSelectionChangedHandler(data)); Init(); }
public ExploreStoresViewModel(IStoreDataStore storeDataStore, IStoreCardService storeCardService, IStorePresenterFactory storePresenterFactory) { StoreCardService = storeCardService; StoreDataStore = storeDataStore; StorePresenterFactory = storePresenterFactory; SearchCommand = new Command <CommandEventData>(Search); RefreshCommand = new Command(() => Refresh()); FetchStores(); Stores = new ObservableCollection <StorePresenter>(AvailableStores); Init(); }
public HomeViewModel(IStoreDataStore storeDataStore, IStoreCardService storeCardService, IStorePresenterFactory storePresenterFactory) { StoreDataStore = storeDataStore; StoreCardService = storeCardService; StorePresenterFactory = storePresenterFactory; FetchFavoriteStores(); RefreshCommand = new Command(() => Refresh()); Init(); }
public StoreController(IStoreDataStore storeData, IUserDataStore userData, IProductDataStore productData, IStoreLicenseDataStore storeLicenseData, IOrderDataStore orderData, IEmployeeDataStore employeeData, IRequestDataStore requestData, IUserConnectedDataStore userConnectedDataStore, ICardDataStore cardDataStore, IStripeServiceDS stripeServiceDS, ISubcriptionDataStore subcriptionDataStore) { userDataStore = userData; StoreDataStore = storeData; productDataStore = productData; storeLicenseDataStore = storeLicenseData; orderDataStore = orderData; employeeDataStore = employeeData; RequestDataStore = requestData; this.userConnectedDataStore = userConnectedDataStore; this.cardDataStore = cardDataStore; this.stripeServiceDS = stripeServiceDS; this.subcriptionDataStore = subcriptionDataStore; //UsersConnected = usersConnected; }
public WorkSpacePresenter(StoresEmployees storesEmployees, IStoreDataStore dataStore) { this.Store = storesEmployees.Store; this.EmployeePosition = storesEmployees.EmployeePosition; this.Id = storesEmployees.Id; this.UserEmployeeId = storesEmployees.UserEmployeeId; this.FullName = storesEmployees.FullName; StoreDataStore = dataStore; DetailCommand = new Command(async() => { var work_hour_data = StoreDataStore.GetEmployeeWorkHoursOfStore(UserEmployeeId.ToString(), this.Store.Id.ToString()); this.EmployeeWork = new List <EmployeeWorkHour>(work_hour_data); MessagingCenter.Send <WorkSpacePresenter, WorkSpacePresenter>(this, "WorkSpaceDetail", this); await Shell.Current.GoToAsync($"{DetailWorkSpace.Route}"); }); }
public EmployeePresenter(StoresEmployees storesEmployees, IStoreDataStore storeDataStore) { this.Id = storesEmployees.Id; this.UserEmployeeId = storesEmployees.UserEmployeeId; this.StoreId = storesEmployees.StoreId; this.IsAlive = storesEmployees.IsAlive; this.EmployeeWork = storesEmployees.EmployeeWork; this.FullName = storesEmployees.FullName; //this.EmployeeStatus = storesEmployees.EmployeeStatus; this.EmployeePosition = storesEmployees.EmployeePosition; StoreDataStore = storeDataStore; DeleteCommand = new Command(() => { var result = storeDataStore.RemoveEmployee(UserEmployeeId.ToString(), StoreId.ToString()); if (result) { MessagingCenter.Send <EmployeePresenter, EmployeePresenter>(this, "ToRemove", this); } }); EditCommand = new Command(async() => { await Shell.Current.GoToAsync($"{ConfigureEmployeePage.Route}?" + $"employeeID={UserEmployeeId.ToString()}"); }); DetailCommand = new Command(async() => { var work_hour_data = StoreDataStore.GetEmployeeWorkHoursOfStore(UserEmployeeId.ToString(), StoreId.ToString()); EmployeeWork = new List <EmployeeWorkHour>(work_hour_data); MessagingCenter.Send <EmployeePresenter, EmployeePresenter>(this, "Detail", this); await Shell.Current.GoToAsync($"{EmployeeDetailView.Route}"); }); }
public ShellViewModel(IStoreDataStore storeDataStore) { _StoreDataStore = storeDataStore; Init(); }
public SettingController(IStripeServiceDS stripeServiceDS, IStoreDataStore storeDataStore, IWorkHourDataStore workHourData) { this.stripeServiceDS = stripeServiceDS; this.storeDataStore = storeDataStore; this.WorkHourDataStore = workHourData; }