Ejemplo n.º 1
0
    protected void grvDetalle_RowCommand(Object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "cmdConfirmar")
        {
            int         index = Convert.ToInt32(e.CommandArgument);
            GridViewRow row   = grvDetalle.Rows[index];
            ListItem    item  = new ListItem();
            item.Text = Server.HtmlDecode(row.Cells[1].Text);

            IBL_Equipaje       carga          = new BL_Equipaje();
            List <BE_Equipaje> ListarEquipaje = carga.f_actualizarEstadoEquipaje(item.Text, 2);

            grvDetalle.DataSource = ListarEquipaje;
            grvDetalle.DataBind();
            btnImprimir.Visible = true;
        }

        if (e.CommandName == "cmdCancelar")
        {
            int         index = Convert.ToInt32(e.CommandArgument);
            GridViewRow row   = grvDetalle.Rows[index];
            ListItem    item  = new ListItem();
            item.Text = Server.HtmlDecode(row.Cells[1].Text);

            IBL_Equipaje       carga          = new BL_Equipaje();
            List <BE_Equipaje> ListarEquipaje = carga.f_actualizarEstadoEquipaje(item.Text, 3);
            grvDetalle.DataSource = ListarEquipaje;
            grvDetalle.DataBind();
            btnImprimir.Visible = false;
        }

        if (e.CommandName == "cmdEditar")
        {
            int         index       = Convert.ToInt32(e.CommandArgument);
            GridViewRow row         = grvDetalle.Rows[index];
            ListItem    item        = new ListItem();
            string      cod         = Convert.ToString(grvDetalle.DataKeys[index].Value);
            string      NroBoleto   = Server.HtmlDecode(row.Cells[1].Text);
            string      NroEquipaje = Server.HtmlDecode(row.Cells[2].Text);
            string      NroBarras   = Server.HtmlDecode(row.Cells[12].Text);
            string      Tamano      = Server.HtmlDecode(row.Cells[13].Text);
            string      ancho       = Tamano.Substring(0, 2);
            string      alto        = Tamano.Substring(3, 2);
            string      peso        = Server.HtmlDecode(row.Cells[5].Text);

            Response.Redirect("~/ModificarEquipaje.aspx?ID=" + cod + "&NroBoleto=" + NroBoleto + "&NroEquipaje=" + NroEquipaje + "&NroBarras=" + NroBarras + "&ancho=" + ancho + "&alto=" + alto + "&peso=" + peso);
        }

        if (e.CommandName == "cmdImprimir")
        {
            int         index = Convert.ToInt32(e.CommandArgument);
            GridViewRow row   = grvDetalle.Rows[index];
            ListItem    item  = new ListItem();
            item.Text = Server.HtmlDecode(row.Cells[1].Text);
            Response.Write("<script>window.open('ImprimirEquipaje.aspx?nroboleto=" + item.Text + "','_blank')</script>");
        }
    }
Ejemplo n.º 2
0
    private void BindData()
    {
        IBL_Equipaje       carga       = new BL_Equipaje();
        List <BE_Equipaje> ListaBoleto = carga.f_listarEquipajeBoleto(txtNroBoleto.Text, txtDNI.Text);

        grvDetalle.DataSource = ListaBoleto;
        grvDetalle.DataBind();
        btnImprimir.Visible = true;
    }
Ejemplo n.º 3
0
 protected void grvDetalle_RowCommand(Object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "cmdModificarEquipaje")
     {
         int          index = Convert.ToInt32(e.CommandArgument);
         GridViewRow  row   = grvDetalle.Rows[index];
         IBL_Equipaje carga = new BL_Equipaje();
         CodBoleto = (int)(Session["CodBoleto"]);
         int      cod       = Convert.ToInt32(grvDetalle.DataKeys[index].Value);
         BE_Tiket objBoleto = carga.f_modificarEquipaje(cod, CodBoleto);
         Response.Redirect("~/ModificarEquipaje.aspx?ID=" + CodBoleto + "&nroboleto=" + Session["NumBoleto"]);
     }
 }
Ejemplo n.º 4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string dt1 = Request.Form[txtDetalleInfraccion.UniqueID];

        int          resultado = 0;
        IBL_Boleto   boleto    = new BL_Boleto();
        IBL_Equipaje carga     = new BL_Equipaje();



        if (dt1.Equals(""))
        {
            string message = "Ingrese el detalle de la infracción.";
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append("<script type = 'text/javascript'>");
            sb.Append("window.onload=function(){");
            sb.Append("alert('");
            sb.Append(message);
            sb.Append("')};");
            sb.Append("</script>");
            ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", sb.ToString());
        }

        else
        {
            //string ruta = "Videos/" + "Bus_" + codbus + "_" + dt2;

            // DateTime a= DateTime.Parse(dt1);
            //resultado = carga.f_RegistrarFilmacion(codbus, dt1, dt2, ruta,estado);
            //if (resultado > 0)
            //{
            //  btnGrabar.Enabled = false;

            resultado = carga.f_RegistrarInfraccion(NroBoleto, dt1);
            List <BE_Boleto> ListaBoleto = boleto.f_CancelarCheckIn(NroBoleto);

            this.mypane1.Visible = true;
            this.mypane2.Visible = true;
            lblMensaje.Text      = "Registro Exitoso";

            lblMensaje0.Text = lblCodBoleto.Text;
            txtDetalleInfraccion.ReadOnly = true;
            btnGrabar.Visible             = false;
            btnCancelar.Visible           = false;
            btnRegresar.Visible           = true;

            //lblRuta.Text = ruta;
            //}
        }
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            string             NumBoleto   = Convert.ToString(Request.QueryString["nroboleto"]);
            IBL_Equipaje       carga       = new BL_Equipaje();
            List <BE_Equipaje> ListaBoleto = carga.f_listarEquipajeBoleto(NumBoleto, "");

            lblNroBol.Text      = ListaBoleto[0].NroBoleto;
            lblPasajero.Text    = ListaBoleto[0].Pasajero;
            lblOrigen.Text      = ListaBoleto[0].Origen;
            lblDestino.Text     = ListaBoleto[0].Destino;
            lblFechaSalida.Text = ListaBoleto[0].FechaSalida;
            lblHoraSalida.Text  = ListaBoleto[0].HoraSalida;

            grvDetalle.DataSource = ListaBoleto;
            grvDetalle.DataBind();
        }
    }