Exemplo n.º 1
0
        private async void AddChild()
        {
            var api_key = (String)Application.Current.Properties["api_key"];

            // temp placeholder for testing.
            UserChilds tempChild = new UserChilds(0, Name, Birthday, api_key, Gender, 0);

            try
            {
                if (await Services.AddChild(tempChild, api_key) == true)
                {
                    MessagingCenter.Send <AddChildViewModel>(this, "update");
                    await NavService.PopToRoot();
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine(e);
            }
        }