示例#1
0
 protected override void excluirRegistro(int Id)
 {
     base.excluirRegistro(Id);
     CaixaBLL = new CaixaBLL();
     try
     {
         if (Convert.ToInt32(dgvDados[0, dgvDados.CurrentRow.Index].Value) > 0)
         {
             Caixa Caixa = CaixaBLL.Localizar(Convert.ToInt32(dgvDados[0, dgvDados.CurrentRow.Index].Value));
             if (MessageBox.Show("Deseja realmente excluir o registro : " + Caixa.Id.ToString() + " - " + Caixa.numero, Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 CaixaBLL.ExcluirCaixa(Caixa);
             }
         }
     }
     finally
     {
         CaixaBLL.Dispose();
     }
 }