public CustomerCreatePageViewModel(IPageNavigator pageNavigator, ILogger logger, IUserDialogs userDialogs, IRequestExceptionHandler requestExceptionHandler, ICustomerManager customerManager) : base(pageNavigator, logger, userDialogs, requestExceptionHandler) { _customerManager = customerManager; BackCommand = new DelegateCommand(async() => await PageNavigator.GoBackAsync()); SubmitCommand = new DelegateCommand(async() => await OnSubmit(), () => OnSubmitCanExecute()); Title = AppResources.TitleAddCustomer; }
public PurchaseOrderCreatePageViewModel(IPageNavigator pageNavigator, ILogger logger, IUserDialogs userDialogs, IRequestExceptionHandler requestExceptionHandler, IPurchaseOrderManager purchaseOrderManager, ICustomerManager customerManager, IProductManager productManager) : base(pageNavigator, logger, userDialogs, requestExceptionHandler) { _purchaseOrderManager = purchaseOrderManager; _customerManager = customerManager; _productManager = productManager; BackCommand = new DelegateCommand(async() => await PageNavigator.GoBackAsync()); SubmitCommand = new DelegateCommand(async() => await OnSubmit(), () => OnSubmitCanExecute()); SelectCustomerCommand = new DelegateCommand(async() => await OnSelectCustomer()); AddProductCommand = new DelegateCommand(async() => await OnAddProduct()); Title = AppResources.TitleCreatePurchaseOrder; _products = new List <ProductEntity>(); PurchaseOrderProducts = new ObservableCollection <PurchaseOrderProductItemModel>(); }
public ClockPageViewModel(IPageNavigator pageNavigator, ILogger logger, IUserDialogs userDialogs, IRequestExceptionHandler requestExceptionHandler, IEventAggregator eventAggregator, ILocationManager locationManager, IGeolocation geolocation, IAppUserManager appUserManager, IEmployeeManager employeeManager, IAttendanceLogManager attendanceLogManager) : base(pageNavigator, logger, userDialogs, requestExceptionHandler, eventAggregator) { _locationManager = locationManager; _geolocation = geolocation; _appUserManager = appUserManager; _employeeManager = employeeManager; _attendanceLogManager = attendanceLogManager; BackCommand = new DelegateCommand(async() => await PageNavigator.GoBackAsync()); SubmitCommand = new DelegateCommand(async() => await OnSubmit(), () => OnSubmitCanExecute()).ObservesProperty(() => CurrentPostion).ObservesProperty(() => CurrentLocationName); _mapDragPinNewLocationEventToken = EventAggregator.GetEvent <MapDragPinNewLocationEvent>().Subscribe(async(pos) => await SetPoint(pos.Latitude, pos.Longitude)); Geofences = new ObservableCollection <Circle>(); }
private void BtnOk_Click(object sender, RoutedEventArgs e) { BtnApply_Click(sender, e); pageNavigator.GoBackAsync(); }