private void TextBoxProviderName_KeyUp(object sender, KeyEventArgs e) { if (this.TextBoxProviderName.Text.Length > 0) { string[] splitName = this.TextBoxProviderName.Text.Split(','); string lastName = splitName[0].Trim(); string firstName = null; if (splitName.Length > 1) { firstName = splitName[1].Trim(); } this.m_PhysicianCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysiciansByName(firstName, lastName); NotifyPropertyChanged("PhysicianCollection"); } }
private void ButtonCopyStVPhysicians_Click(object sender, RoutedEventArgs e) { if (this.m_SystemIdentity.User.UserId == 5001 || this.m_SystemIdentity.User.UserId == 5091) { Business.Domain.PhysicianCollection physicianCollection = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysiciansByClientIdV2(558); NotifyPropertyChanged("PhysicianCollection"); foreach (YellowstonePathology.Business.Domain.Physician physician in physicianCollection) { if (this.m_ClientPhysicianView.PhysicianExists(physician.PhysicianId) == false) { string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Domain.PhysicianClient physicianClient = new Business.Domain.PhysicianClient(objectId, objectId, physician.PhysicianId, physician.ObjectId, this.m_Client.ClientId); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(physicianClient, this); this.m_ClientPhysicianView.Physicians.Add(physician); this.AddDistribution(physicianClient); this.NotifyPropertyChanged("Physicians"); } } } }