コード例 #1
0
        private async void UpdateTodoItem(BatFamily TodoItem)
        {
            TodoItem.Nombre = inputText;
            InputText       = "";
            await BatItemService.UpdateAsync(TodoItem);

            BatFamilyAlls = await BatItemService.GetAllAsync();
        }
コード例 #2
0
        //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();
        }
コード例 #3
0
 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);
 }
コード例 #4
0
        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);
        }
コード例 #5
0
        public async Task InsertAsync(BatFamily todoItem)
        {
            await this.LiteConnection.CreateTableAsync <BatFamily>();

            await this.LiteConnection.InsertAsync(todoItem);
        }
コード例 #6
0
        //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();
        }
コード例 #7
0
 public void Update(BatFamily BatParent)
 {
     this.LiteConnection.Update(BatParent);
 }
コード例 #8
0
 public void Insert(BatFamily BatParent)
 {
     this.LiteConnection.Insert(BatParent);
 }
コード例 #9
0
 private void DeleteTodoItem(BatFamily BatParent)
 {
     this.BatItemService.Delete(BatParent.Id);
     this.BatFamilyAlls = this.BatItemService.GetFamilies();
 }
コード例 #10
0
        //private async void AddTodoItem()
        //{
        //    await BatItemService.GetAllAsync();
        //}

        private async void DeleteTodoItem(BatFamily TodoItem)
        {
            await BatItemService.DeleteAsync(TodoItem);

            BatFamilyAlls = await BatItemService.GetAllAsync();
        }
コード例 #11
0
        public async Task DeleteAsync(BatFamily id)
        {
            await Connection.CreateTableAsync <BatFamily>();

            await Connection.DeleteAsync(id);
        }
コード例 #12
0
        public async Task InsertAsync(BatFamily BatParent)
        {
            await Connection.CreateTableAsync <BatFamily>();

            await Connection.InsertAsync(BatParent);
        }