private async void Deals_Tapped(object sender, EventArgs e) { try { var page = new DealsList(); page.Content.BackgroundColor = Color.FromHex("#000015"); PlaceHolder.Content = page.Content; //lblDeals.TextColor = Color.Magenta; //lblThisWeek.TextColor = Color.White; //lblCategories.TextColor = Color.White; //lblCollections.TextColor = Color.White; bxVwDeals.BackgroundColor = Color.FromHex("#3498db"); bxVwCat.BackgroundColor = Color.Black; bxVwCol.BackgroundColor = Color.Black; bxVwthisWeek.BackgroundColor = Color.Black; ivm.AllDeals = GlobalStaticFields.AllDeals; BindingContext = ivm; await LogService.LogErrorsNew(activity : "User clicked on Deals Tab"); } catch (Exception ex) { LogService.LogErrors(ex.ToString()); } }
private async void Deals_Tapped(object sender, EventArgs e) { var page = new DealsList(); page.Content.BackgroundColor = Color.FromHex("#000015"); PlaceHolder.Content = page.Content; //lblDeals.TextColor = Color.Magenta; //lblThisWeek.TextColor = Color.White; //lblCategories.TextColor = Color.White; //lblCollections.TextColor = Color.White; bxVwDeals.BackgroundColor = Color.FromHex("#3498db"); bxVwCat.BackgroundColor = Color.Black; bxVwCol.BackgroundColor = Color.Black; bxVwthisWeek.BackgroundColor = Color.Black; //IntroPageViewModel intro = new IntroPageViewModel(); //intro.GetDeals(); BindingContext = ivm; //if (ivm?.DealsfromAPI?.Count>0) //{ // BindingContext = ivm?.DealsfromAPI; //} //else //{ // UserDialogs.Instance.ShowLoading("Hi there", Acr.UserDialogs.MaskType.Black); // await Task.Delay(7000); // BindingContext = ivm?.DealsfromAPI; // UserDialogs.Instance.HideLoading(); //} }
protected void Page_Load(object sender, EventArgs e) { DataSet itemDataSet = new DataSet(); DataSet itemSaleDataSet = new DataSet(); ItemController itemController = new ItemController(); try { itemDataSet = itemController.viewAllItems(); itemSaleDataSet = itemController.viewItemsOnSale(); } catch (Exception ex) { ErrorLabel.Text = "An error has occurred. Do not worry, this will be resolved soon!<br/> <br/> <br/>Exception message for nerds: " + ex.ToString(); } DealsList.DataSource = itemSaleDataSet; DealsList.DataBind(); ItemList.DataSource = itemDataSet; ItemList.DataBind(); }