public async Task SaveParentListAsync() { if (this.ParentList != null) { try { this.IsBusy = true; var id = this.Model.IsNew ? -1 : this.Model.Id; if (this.Model.IsNew) { this.ParentList.Add(this.Model); } this.ParentList = await this.ParentList.SaveAsync(); if (id > 0) { this.Model = this.ParentList.GetRoleById(id); } else { // There should always at leave be one, even on an add // Deletes should not use this method this.Model = this.ParentList.Last(); } } finally { this.IsBusy = false; } } }
public RoleEdit(Library.Admin.RoleEditList parent) { ParentList = parent; EditMode = false; ManageObjectLifetime = true; Model = new Library.Admin.RoleEdit(); }
public RoleEdit(Library.Admin.RoleEdit role) { ParentList = (Library.Admin.RoleEditList)role.Parent; EditMode = true; ManageObjectLifetime = true; Model = role; }
public RoleEditListAdapter(Activity context, Library.Admin.RoleEditList items) : base() { this.context = context; this.items = items; }