protected void BtnBuscar_Click(object sender, EventArgs e) { if (TXTBuscar.Text.Trim() == string.Empty) { TXTBuscar.BorderColor = System.Drawing.Color.Red; AlertaID.Visible = true; AlertaIDNoExiste.Visible = false; ListarAtraso(); } else { Controlador.ControladorTareas AuxControladorTarea = new Controlador.ControladorTareas(); Modelo.AtrasoTarea ATRASO = new Modelo.AtrasoTarea(); ATRASO = AuxControladorTarea.ObtenerIDAtrasoTarea(Convert.ToInt32(TXTBuscar.Text)); if (ATRASO.ID_Tarea1 != Convert.ToInt32(TXTBuscar.Text)) { TXTBuscar.BorderColor = System.Drawing.Color.Red; AlertaID.Visible = false; AlertaIDNoExiste.Visible = true; } else { TXTBuscar.BorderColor = System.Drawing.Color.Green; AlertaID.Visible = false; AlertaIDNoExiste.Visible = false; FiltrarAtraso(); } } }