//Determines if there is an active customer/solution, if not the user is prompted to create a new solution and either create/add a customer to it //or continue anonymously /// <summary> /// Creates the new solution. /// </summary> /// <returns>Task<System.Boolean>.</returns> private async Task <bool> CreateNewSolution() { bool?proceedWithSolution = await pdvm.CreateASolutionPrompt(); if (proceedWithSolution.HasValue && proceedWithSolution.Value) { CustomerDatabaseControl.OpenCustomerSelectBlade(); return(false); } if (proceedWithSolution.HasValue && !proceedWithSolution.Value) { pdvm.ContinueAsAnonymous(); return(true); } if (proceedWithSolution == null) { return(true); } return(false); }
private async Task CreateNewSolution() { MessageDialog newSolution = new MessageDialog("Would you like to create a new Solution?"); newSolution.Commands.Add(new UICommand("Yes") { Id = 0 }); newSolution.Commands.Add(new UICommand("No") { Id = 1 }); var result = await newSolution.ShowAsync(); if ((int)result.Id == 0) { CustomerDatabaseControl.OpenCustomerSelectBlade(); } else { } }
private void AddCustomerButton_Click(object sender, RoutedEventArgs e) { CustomerDatabaseControl.OpenCustomerSelectBlade(); }