protected void gdvEmpresas_RowDeleting(object sender, GridViewDeleteEventArgs e) { bll = new BLL.classeBLL(); try { EMP.Empresa emp = new Empresa(); string Usuario = gdvEmpresas.DataKeys[e.RowIndex].Value.ToString(); emp.Usuario = Usuario; bll.ExcluiEmpresa(emp); ListarEmpresas(); } catch (Exception ex) { bll.EnviarErros(ex.Message.ToString()); } }