protected void DeleteRowButton_Click(Object sender, GridViewDeleteEventArgs e) { TableCell cell = gridView1.Rows[e.RowIndex].Cells[1]; int id = Convert.ToInt32(cell.Text); Morador morador = new Morador(); morador.Id = id; morador.Excluir(); this.redirecionarMesmaPagina(); }
public void ExclusaoMorador() { Morador morador = new Morador(); morador.Id = 1; Assert.IsTrue(morador.Excluir()); }