private async void SaveBranch(object branchObj) { BranchesViewModel branchS = branchObj as BranchesViewModel; if ((branchS != null) && branchS.isValid()) { bool postRes = false; BranchesService us = new BranchesService(); postRes = await us.PostAsync(branchS.branch);//us.PostUserSync(userS.user); if (postRes) { BranchesList.Add(branchS); } } Back(); }
private async void DeleteBranch(object branchObj) { BranchesViewModel branchD = branchObj as BranchesViewModel; if (branchD != null && branchD.isValid()) { bool delRes = false; BranchesService us = new BranchesService(); delRes = await us.DeleteAsync(branchD.branch); if (delRes) { BranchesList.Remove(branchD); } } Back(); }