Exemple #1
0
        protected void BtnRechazar_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)))
                {
                    TXTBuscar.BorderColor = System.Drawing.Color.Green;
                    AlertaID.Visible      = false;
                    int idrecibido = Convert.ToInt32(TXTBuscar.Text);

                    AuxControladorTarea.RechazarTarea(idrecibido);
                    ListarTarea();

                    Response.Redirect("FormularioRechazoTarea.aspx?parametro=" + TXTBuscar.Text + "&parametro2=" + EmailTransferido.Text);
                }
                else
                {
                    TXTBuscar.BorderColor    = System.Drawing.Color.Red;
                    AlertaIDNoExiste.Visible = true;
                    ListarTarea();
                }
            }
        }