Beispiel #1
0
        async Task FetchItems()
        {
            if (IsLoading)
            {
                return;
            }

            IsLoading = true;

            var items = await StoreManager.SaleOrderStore.GetOrderItemsByCustomer(Customer.ExternalId);

            List <QuotationsModel> Quotations = new List <QuotationsModel>();

            foreach (var item in items)
            {
                Quotations.Add(new QuotationsModel(item));
            }

            foreach (var item in Quotations)
            {
                item.BackColor = Quotations.IndexOf(item) % 2 == 0 ? Color.FromRgb(247, 247, 247) : Color.White;
            }

            all_items = new ObservableCollection <QuotationsModel>(Quotations);

            QuotationsItemSource = all_items;

            SearchQuery.Execute(null);

            ProductConstants.GenerateProductList();

            IsLoading = false;
        }
Beispiel #2
0
        protected async override void ViewIsAppearing(object sender, EventArgs e)
        {
            base.ViewIsAppearing(sender, e);

            var Has_Permission = await Helpers.Permissions.CheckPermissionLocation();

            await ProductConstants.GenerateProductList();
        }
Beispiel #3
0
        public override void Init(object initData)
        {
            base.Init(initData);

            if (initData != null)
            {
                customer = (Partner)initData;
            }

            ObservableCollection <TTab> pages = new ObservableCollection <TTab>();

            pages.Add(new TTab(this)
            {
                Name = AppResources.ContactDetails, View = typeof(Pages.ContactDetailTabPage)
            });


            if (!CanEdit)
            {
                ProductConstants.GenerateProductList();

                //pages.Add(new TTab(this) { Name = AppResources.Reminder, View = typeof(ContentView) });
                pages.Add(new TTab(this)
                {
                    Name = AppResources.Map, View = typeof(Pages.MapTabPage)
                });
                pages.Add(new TTab(this)
                {
                    Name = AppResources.Quotations, View = typeof(Pages.QuotationsTabPage)
                });
                pages.Add(new TTab(this)
                {
                    Name = AppResources.Orders, View = typeof(Pages.OrderListTabPage)
                });
                pages.Add(new TTab(this)
                {
                    Name = AppResources.Contracts, View = typeof(Pages.ContractListTabPage)
                });
            }

            var selector = new ViewPagerTemplateSelector();

            foreach (var item in pages)
            {
                selector.PageTemplates.Add(new DataTemplate(item.View));
            }

            Tab           = pages;
            ItemTemplates = selector;
        }