private void ButtonNewProvider_Click(object sender, RoutedEventArgs e) { string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); int physicianId = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetLargestPhysicianId() + 1; YellowstonePathology.Business.Domain.Physician physician = new Business.Domain.Physician(objectId, physicianId, "New Physician", "New Physician"); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(physician, this); ProviderEntry providerEntry = new ProviderEntry(physician); providerEntry.ShowDialog(); }