Exemplo n.º 1
0
        private void metroButton18_Click(object sender, EventArgs e)
        {
            EmployeeModel.id         = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[0].Value.ToString();
            EmployeeModel.name       = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[1].Value.ToString();
            EmployeeModel.lastName   = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[2].Value.ToString();
            EmployeeModel.tc         = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[3].Value.ToString();
            EmployeeModel.tel        = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[4].Value.ToString();
            EmployeeModel.adress     = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[5].Value.ToString();
            EmployeeModel.district   = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[6].Value.ToString();
            EmployeeModel.provice    = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[7].Value.ToString();
            EmployeeModel.department = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[8].Value.ToString();
            EmployeeModel.salary     = employeeGrid.Rows[employeeGrid.SelectedRows[0].Index].Cells[9].Value.ToString();
            add_employee update = new add_employee(true);

            update.ShowDialog();
        }
Exemplo n.º 2
0
        private void metroButton19_Click(object sender, EventArgs e)
        {
            add_employee add = new add_employee();

            add.ShowDialog();
        }