protected void BtnAtrasada_Click(object sender, EventArgs e) { Controlador.ControladorTareas AuxControladorTarea = new Controlador.ControladorTareas(); if (TXTBuscar.Text.Trim() == string.Empty) { TXTBuscar.BorderColor = System.Drawing.Color.Red; AlertaID.Visible = true; } else { if (AuxControladorTarea.verificarTarea(Convert.ToInt32(TXTBuscar.Text))) { AlertaIDNoExiste.Visible = false; Modelo.Tarea AuxTarea = new Modelo.Tarea(); int idtarea = Convert.ToInt32(TXTBuscar.Text); AuxTarea = AuxControladorTarea.ObtenerSemaforo(idtarea); if (AuxTarea.ID_Estado1 == 3) { TXTBuscar.BorderColor = System.Drawing.Color.Green; AlertaID.Visible = false; AlertaSemaforo.Visible = false; AuxControladorTarea.AtrasoTarea(idtarea); ListarTarea(); Response.Redirect("FormularioAtrasoTarea.aspx?parametro=" + TXTBuscar.Text + "¶metro2=" + EmailTransferido.Text); } else { TXTBuscar.BorderColor = System.Drawing.Color.Red; AlertaSemaforo.Visible = true; } } else { TXTBuscar.BorderColor = System.Drawing.Color.Red; AlertaIDNoExiste.Visible = true; } } }