Esempio n. 1
0
		public RegisterPlaceListVM (Page mypage) : base (mypage)
		{
			listaPlaces = new TodoItemDatabase ().GetItems ().ToList ();

			InsertPlace = new Command (() => {
				MyPage.Navigation.PushAsync (new RegisterPlaceView ());
			});
		}
Esempio n. 2
0
		protected void InsertPlace ()
		{
			var banco = new TodoItemDatabase ();
			var item = new TodoItem {
				Description = Place.Description,
				Latitude = Place.Latitude,
				Longitude = Place.Longitude
			};

			try {
				var id = banco.SaveItem (item);
				MyPage.Navigation.PopAsync();
			} catch (Exception ex) {
				Xamarin.Insights.Report (ex,Xamarin.Insights.Severity.Critical);
			}
	
		}