Beispiel #1
0
 private void DgpJobRoles_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == 4)
         {
             string id = dgvJobRoles.Rows[e.RowIndex].Cells[0].Value.ToString();
             if (id.Trim() != "")
             {
                 if (DialogResult.Yes == MessageBox.Show("Tem certeza que deseja excluir o cargo?", "Confirmação", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                 {
                     int idI = int.Parse(id);
                     if (!_planningService.ExistsWithJobRole(idI))
                     {
                         _service.ActivateOrDeactivateById(idI, false);
                         LoadToDataGridView();
                     }
                     else
                     {
                         MessageBox.Show("Cargos associados a projetos não podem ser excluídos!", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
                 }
             }
         }
         else if (e.ColumnIndex == 3)
         {
             string      id          = dgvJobRoles.SelectedCells[0].Value.ToString();
             JobRole     jobRole     = _service.ReadById(long.Parse(id));
             JobRoleForm jobRoleForm = new JobRoleForm(jobRole.Id);
             jobRoleForm.ShowDialog();
         }
     }
     catch (Exception)
     {
     }
 }
Beispiel #2
0
        private void Button3_Click_1(object sender, EventArgs e)
        {
            JobRoleForm jobRoleForm = new JobRoleForm();

            jobRoleForm.ShowDialog();
        }
Beispiel #3
0
        private void BtnNovoRecurso_Click(object sender, EventArgs e)
        {
            JobRoleForm jobRoleForm = new JobRoleForm();

            jobRoleForm.ShowDialog();
        }