public static List <Product> GetAllProduct() { List <Product> productList = new List <Product>(); GetDataLogic product = new GetDataLogic(); productList = product.GetAllProducts(); return(productList); }
public async void searchStats(string usernameText) { search.IsEnabled = false; activityIndicator.IsRunning = true; var id = await GetDataLogic.GetID(usernameText); publicid = id; activityIndicator.IsRunning = false; if (id.uid == "error") { await DisplayAlert("Error", "Could not find username: "******"OK"); search.IsEnabled = true; return; } else if (id.uid == "errornointernet") { await DisplayAlert("Error", "Could not connect to the Internet. Please check your connection and try again.", "OK"); search.IsEnabled = true; return; } else { if (id.platforms.Count > 1) { platformselect.ItemsSource = publicid.platforms.ToList(); //we have to show alert to choose platform and then call get user stats. Device.BeginInvokeOnMainThread(() => { if (platformselect.IsFocused) { platformselect.Unfocus(); } platformselect.Focus(); }); } else { //we call it without asking because there is only one platform. var userstats = await GetDataLogic.GetStats(id, 0); await Navigation.PushAsync(new Stats(userstats, favorites)); } var resultsearch = recents.Contains(id.username); if (!resultsearch) { recents.Add(id.username); DependencyService.Get <IGetLists>().SetRecents(recents); } } }
private async void Platformselect_SelectedIndexChanged(object sender, EventArgs e) { if (platformselect.SelectedIndex == -1) { return; } //the second time it doesnt show the picker and it automatically enters -1... it returns null exception. Has to be investigated. var userstats = await GetDataLogic.GetStats(publicid, platformselect.SelectedIndex); await Navigation.PushAsync(new Stats(userstats, favorites)); }
public void InsertOrder(Order order) { GetDataLogic logic = new GetDataLogic(); logic.SaveOrder(order); }
public Order GetOrderById(int id) { GetDataLogic logic = new GetDataLogic(); return(logic.GetOrderById(id)); }
public List <Order> GetAllOrders() { GetDataLogic logic = new GetDataLogic(); return(logic.GetAllOrders()); }
public List <Education> GetAllEducations() { GetDataLogic logic = new GetDataLogic(); return(logic.GetAllEducation()); }
public void UpdateCustomers(Customer customer) { GetDataLogic logic = new GetDataLogic(); logic.UpdateCustomer(customer); }
public void InsertCustomer(Customer customer) { GetDataLogic logic = new GetDataLogic(); logic.SaveCustomer(customer); }
public Customer GetCustomerById(int id) { GetDataLogic logic = new GetDataLogic(); return(logic.GetCustomerById(id)); }
public List <Customer> GetAllCustomers() { GetDataLogic logic = new GetDataLogic(); return(logic.GetAllCustomers()); }
public void UpdateProducts(Product product) { GetDataLogic logic = new GetDataLogic(); logic.UpdateProduct(product); }
public void InsertProduct(Product product) { GetDataLogic logic = new GetDataLogic(); logic.SaveProduct(product); }
public Product GetProductById(int id) { GetDataLogic logic = new GetDataLogic(); return(logic.GetProductById(id)); }
public List <Product> GetAllProducts() { Business_Logic.GetDataLogic logic = new GetDataLogic(); return(logic.GetAllProducts()); }
public void UpdateOrders(Order order) { GetDataLogic logic = new GetDataLogic(); logic.UpdateOrder(order); }