コード例 #1
0
 private void EditNurseDialog_Load(object sender, EventArgs e)
 {
     this.stateComboBox.DataSource          = AppointmentHelper.GetStates().ToList();
     this.genderComboBox.DataSource         = AppointmentHelper.GetGenders().ToList();
     this.dateOfBirthDateTimePicker.MaxDate = DateTime.Now.AddYears(-18);
     this.dateOfBirthDateTimePicker.Value   = this.nurse.DateOfBirth.Value;
     this.stateComboBox.SelectedIndex       = AppointmentHelper.GetStates().FindIndex(x => x.Value.Equals(nurse.State, StringComparison.InvariantCultureIgnoreCase));
     this.genderComboBox.SelectedIndex      = AppointmentHelper.GetGenders().FindIndex(x => x.Value.Equals(nurse.Gender, StringComparison.InvariantCultureIgnoreCase));
     this.firstNameTextBox.Text             = nurse.FirstName;
     this.lastNameTextBox.Text     = nurse.LastName;
     this.cityTextBox.Text         = nurse.City;
     this.streetTextBox.Text       = nurse.Street;
     this.contactPhoneTextBox.Text = nurse.ContactPhone;
     this.zipTextBox.Text          = nurse.Zip;
     this.ssnTextBox.Text          = nurse.SSN;
     this.usernameTextBox.Text     = nurse.Username;
     this.passwordTextBox.Text     = nurse.Password;
     this.isActiveCheckbox.Checked = nurse.IsActiveNurse;
     this.passwordViewer.Visible   = false;
     ssnError.Text          = "";
     firstnameError.Text    = "";
     lastNameError.Text     = "";
     contactPhoneError.Text = "";
     streetError.Text       = "";
     cityError.Text         = "";
     usernameError.Text     = "";
     passwordError.Text     = "";
     zipCodeError.Text      = "";
     errors = new Dictionary <string, string>();
 }
コード例 #2
0
ファイル: AddNurse.cs プロジェクト: cs6232-G4/westga-emr
 private void AddNurse_Load(object sender, EventArgs e)
 {
     this.dateOfBirthDateTimePicker.MaxDate = DateTime.Now.AddYears(-18);
     this.dateOfBirthDateTimePicker.Value   = this.dateOfBirthDateTimePicker.MaxDate;
     this.stateComboBox.DataSource          = AppointmentHelper.GetStates().ToList();
     this.genderComboBox.DataSource         = AppointmentHelper.GetGenders().ToList();
     this.stateComboBox.SelectedIndex       = 0;
     this.genderComboBox.SelectedIndex      = 0;
 }
コード例 #3
0
 public void PopulateTextBoxes(UserDTO aPatient)
 {
     this.dateOfBirthDateTimePicker.MaxDate = DateTime.Now;
     this.stateComboBox.DataSource          = AppointmentHelper.GetStates().ToList();
     this.genderComboBox.DataSource         = AppointmentHelper.GetGenders().ToList();
     this.stateComboBox.SelectedIndex       = 0;
     this.genderComboBox.SelectedIndex      = 0;
     if (aPatient.PatientId > 0)
     {
         this.isNewPatient = false;
         this.addNewPatientLabel.Visible      = false;
         this.updatePatientLabel.Visible      = true;
         this.firstNameTextBox.Text           = aPatient.FirstName;
         this.lastNameTextBox.Text            = aPatient.LastName;
         this.dateOfBirthDateTimePicker.Value = aPatient.DateOfBirth.Value;
         this.contactPhoneTextBox.Text        = aPatient.ContactPhone;
         this.cityTextBox.Text             = aPatient.City;
         this.genderComboBox.SelectedIndex = AppointmentHelper.GetGenders().FindIndex(x => x.Value.Equals(aPatient.Gender, StringComparison.InvariantCultureIgnoreCase));
         this.stateComboBox.SelectedIndex  = AppointmentHelper.GetStates().FindIndex(x => x.Value.Equals(aPatient.State, StringComparison.InvariantCultureIgnoreCase));
         this.streetTextBox.Text           = aPatient.Street;
         this.zipTextBox.Text = aPatient.Zip;
         this.ssnTextBox.Text = String.IsNullOrWhiteSpace(aPatient.SSN) ? "" : aPatient.SSN;
         patient        = new Patient(aPatient.PatientId, aPatient.Id, true);
         patientAddress = new Address(aPatient.AddressId, aPatient.Street, aPatient.City, aPatient.State, aPatient.Zip);
         patientPerson  = new Person(aPatient.Id, "", "", aPatient.FirstName, aPatient.LastName, aPatient.DateOfBirth.Value, aPatient.SSN, aPatient.Gender, aPatient.AddressId, aPatient.ContactPhone);
     }
     else
     {
         this.isNewPatient = true;
         this.addNewPatientLabel.Visible = true;
         this.updatePatientLabel.Visible = false;
         newPatientAddressId             = null;
         newPersonId = null;
         this.dateOfBirthDateTimePicker.Value = this.dateOfBirthDateTimePicker.MaxDate;
     }
 }