public SupplierCataloguePageViewModel(ILinCApiServices services)
        {
            _services = services;

            PickerCellCommand     = new CustomDelegateTimerCommand <ProductType>(async(item) => await PickerTapped(item), item => true);
            SupplierSelectCommand = new CustomDelegateTimerCommand <LinCUser>(async(item) => await SupplierTapped(item), item => true);

            IsSupplierSearched = false;
        }
Ejemplo n.º 2
0
        public LoginPageViewModel(ILinCApiServices services)
        {
            _services       = services;
            LoginCommand    = new CustomDelegateTimerCommand(async() => await Login(), () => true);
            RegisterCommand = new CustomDelegateTimerCommand(() => Register(), () => true);
            CallCommand     = new CustomDelegateTimerCommand(() => CallCustomerCare(), () => true);

            UserDetails = new LinCUser();
        }
Ejemplo n.º 3
0
        public ReviewProductsPageViewModel(ILinCApiServices services)
        {
            _services = services;

            EditProductCommand        = new CustomDelegateTimerCommand <Product>(async(item) => await EditProductAction(item), (item) => true);
            DeleteProductCommand      = new CustomDelegateTimerCommand <Product>(async(item) => await DeleteProductAction(item), (item) => true);
            AddProductCommand         = new CustomDelegateTimerCommand(() => AddProductAction(), () => true);
            SubmitButtonTappedCommand = new CustomDelegateTimerCommand(async() => await SubmitProductsAction(), () => true);
        }
Ejemplo n.º 4
0
        public static List <object> GetMoreMenuOptionList(ILinCApiServices services)
        {
            var moreMenuList = new List <object>();

            //moreMenuList.Add(new Item() { Text = "Settings", ImageName = FontAwesomeIcons.Cog });
            //moreMenuList.Add(new Item() { Text = "Logout", ImageName = FontAwesomeIcons.Building });


            return(moreMenuList);
        }
Ejemplo n.º 5
0
        public LandingPageViewModel(ILinCApiServices services)
        {
            _services = services;

            RegisterButtonTappedCommand    = new CustomDelegateCommand(async() => await RegisterAction(), () => true);
            SupplierCatButtonTappedCommand = new CustomDelegateCommand(() => SupplierCatAction(), () => true);
            ProductCatButtonTappedCommand  = new CustomDelegateCommand(() => ProductCatAction(), () => true);
            MapButtonTappedCommand         = new CustomDelegateCommand(() => MapAction(), () => true);
            ChatButtonTappedCommand        = new CustomDelegateCommand(() => ChatAction(), () => true);
        }
Ejemplo n.º 6
0
        public ProductCataloguePageViewModel(ILinCApiServices services)
        {
            _services = services;

            SearchButtonTappedCommand = new CustomDelegateCommand(async() => await SearchAction(), () => true);

            //PickerCellCommand = new CustomDelegateTimerCommand<ProductType>((item) => PickerTapped(item), item => true);
            AddToCartCommand        = new CustomDelegateCommand(async() => await AddToCartAction(), () => true);
            ProductSelectionCommand = new CustomDelegateCommand <Product>((item) => ProductSelectionAction(item), (item) => true);
            IsSupplierSearched      = false;
        }
Ejemplo n.º 7
0
        public ProductsPageViewModel(ILinCApiServices services)
        {
            _services = services;

            EditProductCommand        = new CustomDelegateTimerCommand <Product>(async(item) => await EditProductAction(item), (item) => true);
            DeleteProductCommand      = new CustomDelegateTimerCommand <Product>(async(item) => await DeleteProductAction(item), (item) => true);
            AddProductCommand         = new CustomDelegateTimerCommand(() => AddProductAction(), () => true);
            SubmitButtonTappedCommand = new CustomDelegateTimerCommand(async() => await SubmitProductsAction(), () => true);
            ProductSelectionCommand   = new CustomDelegateTimerCommand <Product>((item) => SelectProductAction(item), (item) => true);
            IncreaseQuantityCommand   = new CustomDelegateTimerCommand <Product>((item) => IncreaseQuantityAction(item), (item) => true);
            DecreaseQuantityCommand   = new CustomDelegateTimerCommand <Product>((item) => DecreaseQuantityAction(item), (item) => true);
        }
        public AddProductPageViewModel(ILinCApiServices services)
        {
            _services = services;

            PickerCellCommand         = new CustomDelegateTimerCommand <object>((item) => PickerTapped(item), item => true);
            NextButtonTappedCommand   = new CustomDelegateTimerCommand(async() => await NextButtonTapped(), () => true);
            AddNewProductNameCommand  = new CustomDelegateTimerCommand(() => AddNewProductNameAction(), () => true);
            SaveNewProductNameCommand = new CustomDelegateTimerCommand(() => SaveNewProductNameAction(), () => true);
            AdjustQuantityCommand     = new CustomDelegateTimerCommand <string>((item) => AdjustQuantityAction(item), (item) => true);

            Product = new Product();
        }
Ejemplo n.º 9
0
        public AppShellViewModel(ILinCApiServices services, IAppSettings appSettings)
        {
            _services    = services;
            _appSettings = appSettings;

            GoToLoginCommand    = new CustomDelegateCommand(async() => await GoToLogin(), () => true);
            HeaderTappedCommand = new CustomDelegateCommand(async() => await HeaderTapped(), () => true);
            LogoutCommand       = new CustomDelegateCommand(async() => await Logout(), () => true);

            new InitializedViewModelBase(DoInitialSetUp).Invoke();

            SetApiEndPoint();
        }
Ejemplo n.º 10
0
        public CartPageViewModel(ILinCApiServices services)
        {
            _services = services;

            EditProductCommand      = new CustomDelegateTimerCommand <Product>(async(item) => await EditProductAction(item), (item) => true);
            DeleteProductCommand    = new CustomDelegateTimerCommand <Product>(async(item) => await DeleteProductAction(item), (item) => true);
            AddProductCommand       = new CustomDelegateTimerCommand(() => AddProductAction(), () => true);
            PlaceOrderCommand       = new CustomDelegateTimerCommand(() => PlaceOrderAction(), () => true);
            ProductSelectionCommand = new CustomDelegateCommand <Product>((item) => ProductSelectionAction(item), (item) => true);
            IncreaseQuantityCommand = new CustomDelegateCommand <Product>((item) => IncreaseQuantityAction(item), (item) => true);
            DecreaseQuantityCommand = new CustomDelegateCommand <Product>((item) => DecreaseQuantityAction(item), (item) => true);

            OrdersHeadingText = "Orders";
            OrderSubmitText   = "SUBMIT ORDER";
        }
Ejemplo n.º 11
0
        public static List <object> GetImageCaptureOptions(ILinCApiServices services)
        {
            var imageCaptureOptions = new List <object>();

            imageCaptureOptions.Add(new Item()
            {
                Text = "Gallery", ImageName = FontAwesomeIcons.User
            });
            imageCaptureOptions.Add(new Item()
            {
                Text = "Camera", ImageName = FontAwesomeIcons.UserPlus
            });

            return(imageCaptureOptions);
        }
Ejemplo n.º 12
0
        public UserDashboardPageViewModel(ILinCApiServices services)
        {
            _services = services;

            EditProductCommand      = new CustomDelegateTimerCommand <Product>(async(item) => await EditProductAction(item), (item) => true);
            DeleteProductCommand    = new CustomDelegateTimerCommand <Product>(async(item) => await DeleteProductAction(item), (item) => true);
            AddProductCommand       = new CustomDelegateTimerCommand(() => AddProductAction(), () => true);
            PlaceOrderCommand       = new CustomDelegateTimerCommand(() => PlaceOrderAction(), () => true);
            ProductSelectionCommand = new CustomDelegateCommand <Product>((item) => ProductSelectionAction(item), (item) => true);

            EditOrderCommand   = new CustomDelegateTimerCommand <Order>(async(item) => await EditOrderAction(item), (item) => true);
            DeleteOrderCommand = new CustomDelegateTimerCommand <Order>(async(item) => await DeleteOrderAction(item), (item) => true);

            ProductsHeadingText = "Your products";
            OrdersHeadingText   = "Orders";
        }
Ejemplo n.º 13
0
        public RegistrationPageViewModel(ILinCApiServices services)
        {
            _services = services;
            UserTypeSelectionCommand         = new CustomDelegateCommand <object>(userType => SectionVisibilityAction(userType), (userType) => true);
            UseLocationSelectionCommand      = new CustomDelegateCommand <object>(selectionType => UseLocationSelectionAction(selectionType), (selectionType) => true);
            UserRegistrationSelectionCommand = new CustomDelegateCommand <object>(selectionType => UseRegistrationSelectionAction(selectionType), (selectionType) => true);
            ServiceTypeSelectionCommand      = new CustomDelegateCommand <object>(selectionType => ServiceTypeSelectionAction(selectionType), (selectionType) => true);
            PickerCellCommand = new CustomDelegateTimerCommand <object>((item) => PickerTapped(item), item => true);

            UserDetails                = new LinCUser();
            UserDetails.UserTypeId     = 0;
            UserDetails.ProductTypeIds = new List <int>();
            IsOrgVisible               = true;

            NextButtonTappedCommand = new CustomDelegateTimerCommand(async() => await NextButtonTapped(), () => true);
        }
Ejemplo n.º 14
0
 public MainViewModel(ILinCApiServices linCApiServices) : base()
 {
     _linCApiServices = linCApiServices;
 }
Ejemplo n.º 15
0
 public MapPageViewModel(ILinCApiServices services)
 {
     _services = services;
 }