private void metroButtonDistributionAdd_Click(object sender, EventArgs e)
        {
            DistributionEntityForm form = new DistributionEntityForm();

            form.Text          = "Добавление распределения";
            form.btnAddvisible = true;
            form.Show();
        }
 private void metroButtonDistributionEdit_Click(object sender, EventArgs e)
 {
     try
     {
         int did                     = Convert.ToInt32(dataGridViewDistribution.SelectedCells[0].Value.ToString());
         var distribution            = db.Distributions.Find(did);
         DistributionEntityForm form = new DistributionEntityForm();
         form.Text           = "Изменение распределения";
         form.btnEditvisible = true;
         form.DistributionId = distribution.DistributionId;
         form.dsalary        = distribution.DistributionSalary;
         form.dfirst         = distribution.DistributionStart;
         form.dsecond        = distribution.DistributionEnd;
         form.Show();
     }
     catch (Exception gg)
     {
         MessageBox.Show(gg.Message, "Ошибка");
     }
 }