private async void GroupsList_OnItemSelected(object sender, SelectedItemChangedEventArgs e) { MerchGroup selectedGroup = (MerchGroup)e.SelectedItem; GroupPage groupPage = new GroupPage() { BindingContext = selectedGroup }; await Navigation.PushAsync(groupPage); }
private async void AddGroup(object sender, EventArgs e) { var profile = (Profile)BindingContext; if (!String.IsNullOrEmpty(profile.Name)) { App.Repository.SaveProfile(profile); } MerchGroup group = new MerchGroup() { Profile_Id = profile.Id }; GroupPage groupPage = new GroupPage() { BindingContext = group }; await Navigation.PushAsync(groupPage); }
public int DeleteGroup(MerchGroup item) { return(database.Delete(item)); }
public int SaveGroup(MerchGroup item) { return(item.Id != 0 ? database.Update(item) : database.Insert(item)); }