예제 #1
0
        private void CarView_FormClosed(object sender, FormClosedEventArgs e)//изменения в форму родителя
        {
            ObjectsList objectsList = this.Owner as ObjectsList;

            objectsList.FillGrid();
            carPic.Image.Dispose();
        }
예제 #2
0
 private void CarEdit_FormClosed(object sender, FormClosedEventArgs e)//изменение формы родителя
 {
     try
     {
         ObjectView carView = this.Owner as ObjectView;
         if (nameBox.Text == "" || numBox.Text == "" || priceBox.Text == "")
         {
             Data.Objects.DelObject(Data.CurrentObject);
             carView.Close();
         }
         carView.FillForm(Data.CurrentObject);
     }
     catch
     {
         ObjectsList carsList = this.Owner as ObjectsList;
         carsList.FillGrid();
     }
 }