Exemplo n.º 1
0
        public async override void OnNavigatedTo(INavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);
            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
                break;

            case NavigationMode.New:
                using (var client = new HttpClient())
                {
                    var response = await client.GetAsync(Properties.Resources.BaseUrl + "invoices/GetPaidInvoices");

                    if (response.IsSuccessStatusCode)
                    {
                        var invoices = JsonConvert.DeserializeObject <IEnumerable <InvoiceDto> >(await response.Content.ReadAsStringAsync());
                        ListInvoiceBindProp = new ObservableCollection <InvoiceDto>(invoices);
                    }
                }
                CurrentInvoiceBindProp = ListInvoiceBindProp.FirstOrDefault();
                break;

            case NavigationMode.Forward:
                break;

            case NavigationMode.Refresh:
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        public async override void OnNavigatedTo(INavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
                break;

            case NavigationMode.New:
                var invoiceLogic     = new InvoiceLogic(Helper.GetDataContext());
                var itemLogic        = new ItemLogic(Helper.GetDataContext());
                var invoiceItemLogic = new InvoiceItemLogic(Helper.GetDataContext());

                DateRangeBindProp = new DateTimeRange(DateTime.Today.Date, DateTime.Today.Date);
                ListInvoice       = await invoiceLogic.GetAllAsync(InvoiceStatus.Paid);

                ListItem = await itemLogic.GetAllAsync();

                ListInvoiceItem = await invoiceItemLogic.GetAllAsync();

                GetOverallData();
                break;

            case NavigationMode.Forward:
                break;

            case NavigationMode.Refresh:
                break;
            }
        }
Exemplo n.º 3
0
        public override void OnNavigatedTo(INavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
                break;

            case NavigationMode.New:

                if (parameters.ContainsKey(Helper.KEY_SCRUMFRAMEWORK_OBJECT))
                {
                    var scrumFramework = parameters[Helper.KEY_SCRUMFRAMEWORK_OBJECT] as ScrumFramework;

                    TitleBindProp  = scrumFramework.Name;
                    DetailBindProp = scrumFramework.Des;
                }
                ;

                break;

            case NavigationMode.Forward:
                break;

            case NavigationMode.Refresh:
                break;

            default:
                break;
            }
        }
Exemplo n.º 4
0
        public async override void OnNavigatedTo(INavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
                break;

            case NavigationMode.New:
                BillBindProp = parameters[Keys.BILL] as VisualInvoiceModel;
                if (parameters.ContainsKey(Keys.IS_EDITING))
                {
                    IsEditing = true;
                }
                break;

            case NavigationMode.Forward:
                break;

            case NavigationMode.Refresh:
                break;

            default:
                break;
            }
        }
 public void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Tenant = parameters["tenant"] as Customer;
     }
 }
        public override Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            var mode = parameters.GetNavigationMode();

            if (mode == NavigationMode.New)
            {
                Keyword = System.Net.WebUtility.UrlDecode(parameters.GetValue <string>("keyword"));

                SearchOption = new KeywordSearchPagePayloadContent()
                {
                    Keyword = Keyword
                };

                SearchVideoPlaylist = new CeApiSearchVideoPlaylist(new PlaylistId()
                {
                    Id = Keyword, Origin = PlaylistItemsSourceOrigin.SearchWithKeyword
                }, SearchProvider);
                SelectedSortOption = CeApiSearchVideoPlaylist.DefaultSortOption;

                this.ObserveProperty(x => x.SelectedSortOption)
                .Subscribe(_ => ResetList())
                .AddTo(_navigationDisposables);
            }


            SelectedSearchTarget.Value = SearchTarget.Keyword;


            _searchHistoryRepository.Searched(SearchOption.Keyword, SearchOption.SearchTarget);

            return(base.OnNavigatedToAsync(parameters));
        }
Exemplo n.º 7
0
 public virtual void OnNavigatedTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.Back || parameters.ContainsKey(BaseNavigationParameterKeys.SetUpReactiveAgain))
     {
         this.SetUpReactive();
     }
 }
 public void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Notification = parameters["noti"] as Notification;
     }
 }
        public override async Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            var mode = parameters.GetNavigationMode();

            if (mode == NavigationMode.New)
            {
                Keyword = System.Net.WebUtility.UrlDecode(parameters.GetValue <string>("keyword"));
            }

            _NowNavigatingTo = true;
            try
            {
                if (NiconicoSession.IsLoggedIn)
                {
                    _reservation = await NiconicoSession.ToolkitContext.Timeshift.GetTimeshiftReservationsDetailAsync();
                }
            }
            finally
            {
                _NowNavigatingTo = false;
            }

            //SelectedSearchSort.Value = SearchOption.Sort;
            //SelectedLiveStatus.Value = SearchOption.LiveStatus;
            //SelectedProviders.Clear();
            //SelectedProviders.AddRange(SearchOption.Providers);

            if (!string.IsNullOrWhiteSpace(Keyword))
            {
                _searchHistoryRepository.Searched(Keyword, SearchTarget.Niconama);
            }

            await base.OnNavigatedToAsync(parameters);
        }
Exemplo n.º 10
0
        public override void OnNavigatedTo(INavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            switch (parameters.GetNavigationMode())
            {
            case NavigationMode.Back:
                if (parameters.ContainsKey(Keys.EMPLOYEE))
                {
                    var employee = parameters[Keys.EMPLOYEE] as VisualEmployeeModel;
                    ListEmployeeBindProp.Add(employee);
                }
                break;

            case NavigationMode.New:
                GetEmployees();
                break;

            case NavigationMode.Forward:
                break;

            case NavigationMode.Refresh:
                break;
            }
        }
Exemplo n.º 11
0
        public async override void OnNavigatedTo(INavigationParameters parameters)
        {
            try
            {
                base.OnNavigatedTo(parameters);
                if (parameters.GetNavigationMode().Equals(NavigationMode.Back))
                {
                    SelectedProduct = null;
                }
                else
                {
                    List <Category> category = await GetAllCategories();

                    if (category != null && category.Count > 0)
                    {
                        Categories  = category.Select(e => e.Name).ToList();
                        CategoryIds = category.Select(e => e.Id).ToList();
                    }
                    else
                    {
                        Categories  = new List <string>();
                        CategoryIds = new List <string>();
                    }

                    Position = 0;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 12
0
 public void OnNavigatedTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Message = parameters.GetValue <string>("Para");
     }
 }
Exemplo n.º 13
0
        public override Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            var mode = parameters.GetNavigationMode();

            if (mode == NavigationMode.New)
            {
                SearchOption = new KeywordSearchPagePayloadContent()
                {
                    Keyword = System.Net.WebUtility.UrlDecode(parameters.GetValue <string>("keyword"))
                };
            }


            SelectedSearchTarget.Value = SearchTarget.Keyword;

            SelectedSearchSort.Value = VideoSearchOptionListItems.First(x => x.Sort == SearchOption.Sort && x.Order == SearchOption.Order);

            KeywordSearchBookmark = Database.BookmarkDb.Get(Database.BookmarkType.SearchWithKeyword, SearchOption.Keyword)
                                    ?? new Database.Bookmark()
            {
                BookmarkType = Database.BookmarkType.SearchWithKeyword,
                Label        = SearchOption.Keyword,
                Content      = SearchOption.Keyword
            };
            RaisePropertyChanged(nameof(KeywordSearchBookmark));

            Database.SearchHistoryDb.Searched(SearchOption.Keyword, SearchOption.SearchTarget);

            PageManager.PageTitle = $"\"{SearchOption.Keyword}\"";

            return(base.OnNavigatedToAsync(parameters));
        }
Exemplo n.º 14
0
        public override Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            var mode = parameters.GetNavigationMode();

            if (mode == NavigationMode.New)
            {
                Keyword = System.Net.WebUtility.UrlDecode(parameters.GetValue <string>("keyword"));

                SearchOption = new LiveSearchPagePayloadContent()
                {
                    Keyword = Keyword
                };
            }

            SelectedSearchTarget.Value = SearchTarget.Niconama;

            _NowNavigatingTo         = true;
            SelectedSearchSort.Value = LiveSearchSortOptionListItems.FirstOrDefault(x => x.Sort == SearchOption.Sort && x.Order == SearchOption.Order);
            SelectedSearchMode.Value = LiveSearchModeOptionListItems.FirstOrDefault(x => x.Mode == SearchOption.Mode) ?? LiveSearchModeOptionListItems.First();
            SelectedProvider.Value   = LiveSearchProviderOptionListItems.FirstOrDefault(x => x.Provider == SearchOption.Provider);
            _NowNavigatingTo         = false;


            Database.SearchHistoryDb.Searched(SearchOption.Keyword, SearchOption.SearchTarget);

            return(base.OnNavigatedToAsync(parameters));
        }
Exemplo n.º 15
0
 public void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Customer = parameters["customer"] as Customer;
     }
 }
 public void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Technician = parameters["tech"] as Technicians;
     }
 }
 public async void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Property = parameters["property"] as Property;
         await SetProperty();
     }
 }
Exemplo n.º 18
0
 public override void OnNavigatedTo(INavigationParameters parameters)
 {
     base.OnNavigatedTo(parameters);
     if (parameters.GetNavigationMode().Equals(NavigationMode.New))
     {
         Xamarin.Forms.DependencyService.Get <IAuthHelper>().Authenticate(0);
     }
 }
Exemplo n.º 19
0
 public override void OnNavigatedTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() != NavigationMode.Back)
     {
         LoadData();
         CurrentCategory = Categories.FirstOrDefault();
     }
 }
Exemplo n.º 20
0
 public void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         IssueId  = parameters["issueId"].ToString();
         Customer = parameters["customer"] as Customer;
     }
 }
Exemplo n.º 21
0
        public async override Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            if (parameters.GetNavigationMode() == NavigationMode.New)
            {
            }

            await base.OnNavigatedToAsync(parameters);
        }
 public void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Customer   = parameters["customer"] as Customer;
         TenantName = parameters["tenantName"].ToString();
     }
 }
 public async void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Issue = parameters["issue"] as Issue;
         await GetQuotation();
     }
 }
        public override async Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            if (parameters.TryGetValue(nameof(InsuranceType), out InsuranceType insuranceType))
            {
                Request.InsuranceType = insuranceType;
            }

            if (parameters.GetNavigationMode() == NavigationMode.New)
            {
                requestCancellationTokenSource?.Cancel();
                requestCancellationTokenSource = new CancellationTokenSource();

                using (_userDialogs.Loading(ConstantStrings.Loading, cancelText: ConstantStrings.Loading_Cancel, onCancel: requestCancellationTokenSource.Cancel))
                {
                    await syncData();
                }

                if (parameters.TryGetValue(nameof(Request), out EvlRequestItemSource request))
                {
                    Request = request;

                    SelectedInsurer = Insurers.FirstOrDefault(i => i.ID == Request.InsurerId);

                    SelectedCar = Cars.FirstOrDefault(c => c.PrmID == Request.CarId);

                    License = _licenseHelper.ConvertToItemSource(Request.PlateNumber);

                    SelectedAlphabet = Alphabets.FirstOrDefault(a => a.Name == License.Alphabet);
                }
            }
            else if (parameters.GetNavigationMode() == NavigationMode.Back)
            {
                Request = parameters.GetValue <EvlRequestItemSource>(nameof(Request));

                SelectedInsurer = new InsurersItemSource();

                SelectedInsurer = Insurers.FirstOrDefault(i => i.ID == Request.InsurerId);

                //SelectedCar = Cars.FirstOrDefault(c => c.PrmID == Request.CarId);

                //License = _licenseHelper.ConvertToItemSource(Request.PlateNumber);

                //SelectedAlphabet = Alphabets.FirstOrDefault(a => a.Name == License.Alphabet);
            }
        }
 public void OnNavigatingTo(INavigationParameters parameters)
 {
     if (parameters.GetNavigationMode() == NavigationMode.New)
     {
         Job = parameters["job"] as JobCard;
         var items = parameters["issues"] as List <Issue>;
         Issues = new ObservableCollection <Issue>(items);
     }
 }
Exemplo n.º 26
0
        public override void OnNavigatedTo(INavigationParameters parameters)
        {
            if (parameters.GetNavigationMode() == NavigationMode.New)
            {
                _fcm.OnNotificationReceived += _fcm_OnNotificationReceived;

                UpdateChatEntriesCommand.Execute();
            }
        }
Exemplo n.º 27
0
        public async override Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            await base.OnNavigatedToAsync(parameters);

            if (parameters.GetNavigationMode() == NavigationMode.New)
            {
                await ToDoService.LoadData(CancellationToken.None);
            }
        }
Exemplo n.º 28
0
 public override void OnNavigatedTo(INavigationParameters parameters)
 {
     base.OnNavigatedTo(parameters);
     if (parameters.GetNavigationMode() != NavigationMode.Back)
     {
         var products = Data.Products.Where(e => e.Category == Product.Category && e.Id != Product.Id).ToArray();
         Products = new List <Product>(products);
     }
 }
        public static void SetCurrentNavigationParameters(INavigationParameters parameters)
        {
            if (parameters.GetNavigationMode() == Prism.Navigation.NavigationMode.Refresh)
            {
                return;
            }

            CurrentNavigationParameters = parameters;
        }
Exemplo n.º 30
0
        public override void OnNavigatedTo(INavigationParameters parameters)
        {
            var navigationMode = parameters.GetNavigationMode();

            if (navigationMode != NavigationMode.Back)
            {
                Task.Run(() => InitializeAsync()).ConfigureAwait(false);
            }
        }