Пример #1
0
        private void metroButtonEmployeeAdd_Click(object sender, EventArgs e)
        {
            EmployeeEntityForm form = new EmployeeEntityForm();

            form.Text          = "Добавление сотрудника";
            form.btnAddvisible = true;
            form.Show();
        }
Пример #2
0
        private void metroButtonEmployeeEdit_Click(object sender, EventArgs e)
        {
            int eid                 = Convert.ToInt32(dataGridViewEmployee.SelectedCells[0].Value.ToString());
            var employee            = db.Employees.Find(eid);
            EmployeeEntityForm form = new EmployeeEntityForm();

            form.Text           = "Изменение сотрудника";
            form.EmployeeId     = employee.EmployeeId;
            form.esur           = employee.EmployeeSurName;
            form.efname         = employee.EmployeeFirstName;
            form.esname         = employee.EmployeeSecondName;
            form.etel           = employee.EmployeeTelephone;
            form.btnEditvisible = true;
            form.Show();
        }