public async Task RemoveChurch(Church church) { Dictionary<string,string> uid = new Dictionary<string,string>(); uid.Add("id",CurrentUser.Id); uid.Add ("churchid", church.Id); await client.InvokeApiAsync("ChurchCustom/RemoveChurch/", HttpMethod.Get, uid); }
public void SelectChurch(Church church) { prayerService.AddChurchUser (church); SettingsController settingsController =(SettingsController)Storyboard.InstantiateViewController("SettingsController"); if (NavigationController.TopViewController as SettingsController == null){ var ex = NavigationController.ViewControllers.OfType<SettingsController>().FirstOrDefault(); if (ex != null) { NavigationController.PopToViewController(ex,true); } else { NavigationController.PushViewController (settingsController, false); } } UIAlertView alert = new UIAlertView () { Title = "Church", Message = "Your church has been assigned." }; alert.AddButton("OK"); alert.Show (); }
public async Task AddChurchUser(Church church) { ChurchUserDTO cuDTO = new ChurchUserDTO () { UserId = CurrentUser.Id, ChurchId = church.Id }; await client.InvokeApiAsync<ChurchUserDTO,object>("ChurchUser/PostChurchUser/", cuDTO); }