private void rentGridButton_Click(object sender, EventArgs e)
        {
            RentsList rentList = new RentsList();

            rentList.Owner = this;
            rentList.ShowDialog();
        }
Beispiel #2
0
 private void RentEdit_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         this.Close();
         try
         {
             RentView rentView = this.Owner as RentView;
             rentView.Close();
         }
         catch
         {
         }
         try
         {
             RentView    rentView   = this.Owner as RentView;
             RentsList   rList      = rentView.Owner as RentsList;
             ObjectView  objectView = rList.Owner as ObjectView;
             ObjectsList objList    = objectView.Owner as ObjectsList;
             rentView.Close();
             rList.Close();
             objectView.Close();
             objList.Close();
         }
         catch
         {
         }
     }
 }
 private void RentView_FormClosed(object sender, FormClosedEventArgs e)
 {
     //обновление формы "родителя"
     carPic.Image.Dispose();
     try
     {
         MainForm mainForm = this.Owner as MainForm;
         mainForm.FillRents();
     }
     catch { }
     try
     {
         RentsList rentList = this.Owner as RentsList;
         rentList.FillList(Data.CurrentObject);
     }
     catch { }
 }