private async void UpdateTodoItem(BatFamily TodoItem) { TodoItem.Nombre = inputText; InputText = ""; await BatItemService.UpdateAsync(TodoItem); BatFamilyAlls = await BatItemService.GetAllAsync(); }
//private void UpdateTodoItem()//(BatFamily BatParent) //{ // this.SelectedBatFamily.Nombre = InputText; // this.BatItemService.Update(SelectedBatFamily); // this.InputText = ""; // this.BatFamilyAlls = this.BatItemService.GetFamilies(); // //string sabana = InputText; // //this.SelectedBatFamily.Nombre = sabana;//?? "hector"; // //if (sabana != null) // //{ // // this.BatItemService.Update(SelectedBatFamily); // // this.InputText = ""; // // this.BatFamilyAlls = this.BatItemService.GetFamilies(); // //} // //else // //{ // // InputText = "error"; // //} // //this.BatItemService.Update(SelectedBatFamily); // //this.InputText = ""; // //this.BatFamilyAlls = this.BatItemService.GetFamilies(); //} private async void UpdateTodoItem(BatFamily BatParent) { BatParent.Nombre = this.inputText; this.InputText = ""; await this.BatItemService.UpdateAsync(BatParent); this.BatFamilyAlls = await this.BatItemService.GetAllAsync(); }
public MainPageViewModel(INavigationService navigationService, IBatFamilyService BatSericeParam) : base(navigationService) { BatItemService = BatSericeParam; _ItemSeleccionado = new BatFamily(); GetBatFamilies(); this.AddCommand = new DelegateCommand(AddTodoItem, () => !string.IsNullOrEmpty(InputText)).ObservesProperty(() => this.InputText); DeleteCommand = new DelegateCommand <BatFamily>(this.DeleteTodoItem); UpdateCommand = new DelegateCommand <BatFamily>(UpdateTodoItem); }
public MainPageViewModel(INavigationService navigationService, IBatFamilyService batFamilyServiceParam) : base(navigationService) { this.BatItemService = batFamilyServiceParam; SelectedBatFamily_BF = new BatFamily(); GetBatFamilies(); this.AddCommand = new DelegateCommand (this.AddTodoItem, () => !string.IsNullOrEmpty(this.InputText)).ObservesProperty(() => this.InputText); this.DeleteCommand = new DelegateCommand <BatFamily>(this.DeleteTodoItem); //this.UpdateCommand = new DelegateCommand(this.UpdateTodoItem);//, () => !string.IsNullOrEmpty(this.InputText));//.ObservesProperty(() => this.InputText); this.UpdateCommand = new DelegateCommand <BatFamily>(this.UpdateTodoItem); }
public async Task InsertAsync(BatFamily todoItem) { await this.LiteConnection.CreateTableAsync <BatFamily>(); await this.LiteConnection.InsertAsync(todoItem); }
//private void DeleteTodoItem(BatFamily BatParent) //{ // this.BatItemService.Delete(BatParent.Id); // this.BatFamilyAlls = this.BatItemService.GetFamilies(); //} private async void DeleteTodoItem(BatFamily BatParent) { await this.BatItemService.DaleteAsync(BatParent); this.BatFamilyAlls = await this.BatItemService.GetAllAsync(); }
public void Update(BatFamily BatParent) { this.LiteConnection.Update(BatParent); }
public void Insert(BatFamily BatParent) { this.LiteConnection.Insert(BatParent); }
private void DeleteTodoItem(BatFamily BatParent) { this.BatItemService.Delete(BatParent.Id); this.BatFamilyAlls = this.BatItemService.GetFamilies(); }
//private async void AddTodoItem() //{ // await BatItemService.GetAllAsync(); //} private async void DeleteTodoItem(BatFamily TodoItem) { await BatItemService.DeleteAsync(TodoItem); BatFamilyAlls = await BatItemService.GetAllAsync(); }
public async Task DeleteAsync(BatFamily id) { await Connection.CreateTableAsync <BatFamily>(); await Connection.DeleteAsync(id); }
public async Task InsertAsync(BatFamily BatParent) { await Connection.CreateTableAsync <BatFamily>(); await Connection.InsertAsync(BatParent); }