Exemple #1
0
        private void dgvTarefas_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                DataGridView dgvTemp = (DataGridView)sender;
                if (e.RowIndex >= 0)
                {
                    if (dgvTarefas[colId.Index, dgvTemp.CurrentRow.Index].Value == null)
                    {
                        return;
                    }
                    int id = int.Parse(dgvTarefas[colId.Index, dgvTemp.CurrentRow.Index].Value.ToString());
                    if (id == 0)
                    {
                        return;
                    }

                    frmCadTarefa lfrCadTarefa = new frmCadTarefa();
                    lfrCadTarefa.Carregar(int.Parse(dgvTarefas[colId.Index, dgvTemp.CurrentRow.Index].Value.ToString()), this);
                }
            }
            catch (Exception ex)
            {
                WinControls.ApresentarErro(AssistErroException.TratarErro(ex));
            }
        }
Exemple #2
0
 public override void Novo(object sender, EventArgs e)
 {
     try
     {
         base.Novo(sender, e);
         frmCadTarefa lfrmCadTarefa = new frmCadTarefa();
         lfrmCadTarefa.Carregar(this);
     }
     catch (Exception ex)
     {
         WinControls.ApresentarErro(AssistErroException.TratarErro(ex));
     }
 }