You are on page 1of 2

string sql5 = "select * from ControlPaquete where NroPaquete = '" +

this.NroPedido.Text.ToString() + "' and Estado='Vigente'";

ooData3 = obDatos2.consultar2("ControlPaquete", sql5);

if (ooData3.Rows.Count != 0)

DateTime Fecha = DateTime.Now;

string campos = "Fechaactivacion='" + Fecha.Year.ToString() + "-" +


Fecha.Month.ToString("00") + "-" + Fecha.Day.ToString("00") + "',Estado='Eliminado'";

//Determinacion del estado actual de la solicitud

if (obDatos2.actualizar("ControlPaquete", campos, " NroPaquete = '" +


this.NroPedido.Text.ToString() + "'"))

String rootPath = Server.MapPath("~");

// File.Delete(rootPath + "//" + this.NroPedido.Text.ToString() + "//" +


this.NroPedido.Text.ToString() + ".pdf");

this.NroPedido.Text = "";

FailureText.Text = "Paquete eliminado";

ErrorMessage.Visible = true;

else

FailureText.Text = "Paquete no se puede eliminar";

ErrorMessage.Visible = true;

}
}

else

FailureText.Text = "No existe paquete";

ErrorMessage.Visible = true;

You might also like