private void ExecuteSavemilkDigitalIDCommand() { // Check for validation if (!CheckInputs()) { IsValid = false; return; } IsValid = true; // Save To Database milkDigitalID digitalId = new milkDigitalID() { FirstName = FirstStep.FirstName, LastName = FirstStep.LastName, MiddleName = FirstStep.MiddleName, NickName = FirstStep.NickName, DateOfBirth = FirstStep.DateOfBirth, Gender = FirstStep.Gender, Height = FirstStep.Height, Weight = FirstStep.Weight, Age = CalculateYear(), BloodType = FinalStep.BloodType, Comments = FinalStep.Comments, Contact = FinalStep.Contact, DistinguishingMarks = FinalStep.DistinguishingMarks, EyeColor = FinalStep.EyeColor, Glasses = FinalStep.Glasses, HairColor = FinalStep.HairColor, Race = FinalStep.Race, PhotoDate = DateTime.UtcNow, }; if (FirstStep.FrontPhoto != null) { digitalId.PortraitView = ImageHelpers.ConvertStreamToBytes(FirstStep.FrontPhoto.Stream); digitalId.ImagePortraitView = FirstStep.FrontPhoto.Path; } if (FirstStep.SidePhoto != null) { digitalId.SideView = ImageHelpers.ConvertStreamToBytes(FirstStep.SidePhoto.Stream); digitalId.ImageSideView = FirstStep.SidePhoto.Path; } _milkDigitalIDService.CreateDigitalID(digitalId); App.GoToRoot(); // App.CurrentApp.MainPage = new HOPage(); // var result = await Application.Current.MainPage.DisplayAlert("Registration", "Successfully Registered!", "Ok", "Cancel"); }