Beispiel #1
0
        private void metroButtonPosotionAdd_Click(object sender, EventArgs e)
        {
            PositionEntityForm form = new PositionEntityForm();

            form.Text          = "Добавление должности";
            form.btnAddvisible = true;
            form.Show();
        }
Beispiel #2
0
 private void metroButtonPositionEdit_Click(object sender, EventArgs e)
 {
     try
     {
         int pid                 = Convert.ToInt32(dataGridViewPosition.SelectedCells[0].Value.ToString());
         var position            = db.Positions.Find(pid);
         PositionEntityForm form = new PositionEntityForm();
         form.Text           = "Изменение должности";
         form.btnEditvisible = true;
         form.PositionId     = position.PositionId;
         form.pname          = position.PositionName;
         form.Show();
     }
     catch (Exception gg)
     {
         MessageBox.Show(gg.Message, "Ошибка");
     }
 }