Exemplo n.º 1
0
 private void EditAddress_Click(object sender, EventArgs e)
 {
     using (addEditAddress frm = new addEditAddress(basePatient.Address, this))
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             ptAddressID.Text      = frm.getAddressID().ToString();
             basePatient.AddressID = frm.getAddressID();
             initAddress           = frm.getAddress();
         }
     }
 }
Exemplo n.º 2
0
 private void EditAddress_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(dcName.Text) || String.IsNullOrEmpty(dcAddressID.Text) || String.IsNullOrEmpty(dcDateOfBirth.Text) ||
         String.IsNullOrEmpty(dcGender.Text) || String.IsNullOrEmpty(dcLastName.Text) || String.IsNullOrEmpty(dcPhoneNumber.Text) ||
         String.IsNullOrEmpty(dcSalary.Text) || String.IsNullOrEmpty(dcDiseaseID.Text))
     {
         MessageBox.Show("Please fill all other areas before adding address", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     using (addEditAddress frm = new addEditAddress(baseDoctor.Address, this))
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             baseDoctor.AddressID = frm.getAddressID();
             dcAddressID.Text     = frm.getAddressID().ToString();
             initAddress          = frm.getAddress();
         }
     }
 }