private void EditingDepartment_Load(object sender, EventArgs e)
        {
            DepartmentStore f = (DepartmentStore)this.Owner;

            id = f.id_department.ToString();
            comboBox1.SelectedItem = f.city.ToString();
            comboBox2.SelectedItem = f.street.ToString();
            textBox1.Text          = f.house.ToString();
            maskedTextBox1.Text    = f.telephone.ToString();
        }
 private void Button1_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text != "" && comboBox2.Text != "" && textBox1.Text != "" && maskedTextBox1.Text != "")
     {
         Edit();
         DepartmentStore f = (DepartmentStore)this.Owner;
         f.LoadAll();
     }
     else
     {
         MessageBox.Show("Заполните все поля!.", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void МагазиныToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DepartmentStore f = new DepartmentStore();

            f.ShowDialog();
        }
        private void Button5_Click(object sender, EventArgs e)
        {
            DepartmentStore f = new DepartmentStore();

            f.ShowDialog();
        }