Exemplo n.º 1
0
 private void SpouseForm_Load(object sender, EventArgs e)
 {
     bindingNavigatorDeleteItem.Enabled = false;
     if (Spouse == null)
     {
         return;
     }
     spousBindingSource.DataSource    = Spouse;
     childrenBindingSource.DataSource = ChildrenManagement.GetAll(Spouse.SpouseNo);
 }
Exemplo n.º 2
0
 private void spousBindingSource_CurrentChanged(object sender, EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
     if (spousBindingSource != null)
     {
         if (spousBindingSource.Current != null)
         {
             Spouse = (Spous)spousBindingSource.Current;
             childrenBindingSource.DataSource = ChildrenManagement.GetAll(((Spous)spousBindingSource.Current).SpouseNo);
         }
         else
         {
             childrenBindingSource.DataSource = ChildrenManagement.GetAll(0);
         }
     }
     Cursor.Current = Cursors.Default;
 }