public async Task New_Project() { Model.Project New_Project = new Model.Project(); New_Project.Categories = new ObservableCollection <Model.Category>(); New_Project.Get_Completion(); New_Project.Get_Cost(); Projects.Add(New_Project); //Telling the page that it'a new Item Selected_Project = New_Project; await Page_Navigation.PushAsync(new View.Project_View()); }
public async Task Fetch_Data() { IsBusy = true; Projects.Clear(); try { var Query = Azure.QueryManager.Set_Query(); while (Query.HasMoreResults) { foreach (Model.Document DB_Document in await Query.ExecuteNextAsync <Model.Document>()) { //Creates Business object to be added to the list Model.Project New_Project = new Model.Project { ID = DB_Document.Id, Name = DB_Document.Name, Frame = DB_Document.Frame, Living = DB_Document.Living, Slab = DB_Document.Slab, Categories = DB_Document.Categories }; New_Project.Get_Completion(); New_Project.Get_Cost(); Projects.Add(New_Project); } } IsBusy = false; } catch (DocumentClientException de) { Exception baseException = de.GetBaseException(); Console.WriteLine("{0} error occurred: {1}, Message: {2}", de.StatusCode, de.Message, baseException.Message); } catch (Exception e) { Exception baseException = e.GetBaseException(); Console.WriteLine("Error: {0}, Message: {1}", e.Message, baseException.Message); } }