Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (!String.IsNullOrEmpty(Context.Request.QueryString["opt"]))
                {
                    if (Context.Request.QueryString["opt"] == "1")
                    {
                        pnlSecreto.Visible = true;


                        if (!String.IsNullOrEmpty(Context.Request.QueryString["idcarga"]))
                        {
                            UPC.CruzDelSur.Datos.Carga.Carga          oBL_Carga = new UPC.CruzDelSur.Datos.Carga.Carga();
                            UPC.CruzDelSur.Negocio.Modelo.Carga.Carga oBE_Carga = oBL_Carga.f_ListadoUnoCarga(Int32.Parse(Context.Request.QueryString["idcarga"]));
                            hfRespuesta.Value   = oBE_Carga.RESPUESTA_SEGURIDAD;
                            txtPregunta.Text    = oBE_Carga.PREGUNTA_SEGURIDAD;
                            txtPregunta.Enabled = false;
                        }
                    }
                    else
                    {
                        pnlSecreto.Visible = false;
                    }
                }
            }
        }
        protected void gvfichacarga_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Modificar")
            {
                Session.Remove("idProgramacionRuta");
                Session.Remove("idRemitente");
                Session.Remove("idDestinatario");
                Session.Remove("ListaProducto");
                Session.Remove("idProducto");
                Session.Remove("idcarga");

                Session.Remove("pregunta");
                Session.Remove("respuesta");
                Response.Redirect(String.Concat("ActualizarFichaCarga.aspx?idficha=", e.CommandArgument));
            }
            if (e.CommandName == "Anular")
            {
                Session.Remove("idProducto");
                Session.Remove("idProgramacionRuta");
                Session.Remove("idRemitente");
                Session.Remove("idDestinatario");
                Session.Remove("ListaProducto");
                Session.Remove("idcarga");

                Session.Remove("pregunta");
                Session.Remove("respuesta");
                UPC.CruzDelSur.Datos.Carga.Carga oBL_Carga = new UPC.CruzDelSur.Datos.Carga.Carga();
                int o = oBL_Carga.f_ActualizarEstadoCarga("Anulado", e.CommandArgument.ToString());
                CargarFichas();
            }
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (!String.IsNullOrEmpty(Context.Request.QueryString["idficha"]))
                {
                    hffichacarga.Value = Context.Request.QueryString["idficha"].ToString();

                    btnIngresarCodigo.OnClientClick = "javascript:OpenModalDialog('Validar.aspx?opt=2&idcarga=" + hffichacarga.Value + " ','null','400','800')";



                    UPC.CruzDelSur.Datos.Carga.Carga          oBL_Carga             = new UPC.CruzDelSur.Datos.Carga.Carga();
                    UPC.CruzDelSur.Negocio.Modelo.Carga.Carga oBEMG_ES01_FichaCarga = oBL_Carga.f_ListadoUnoCarga(Int32.Parse(hffichacarga.Value));

                    lblEstadoPago.Text   = oBEMG_ES01_FichaCarga.ESTADOPAGO;
                    lblClave.Text        = "*****";
                    lbligv.Text          = String.Concat("S/.", oBEMG_ES01_FichaCarga.DBL_IGV.Value.ToString("##0.00"));
                    lblTotal.Text        = String.Concat("S/.", oBEMG_ES01_FichaCarga.DBL_TOTAL.Value.ToString("##0.00"));
                    lblNumeroFicha.Text  = oBEMG_ES01_FichaCarga.FICHA;
                    lblImporteTotal.Text = String.Concat("S/.", oBEMG_ES01_FichaCarga.DBL_IMPORTETOTAL.Value.ToString("##0.00"));
                    UPC.CruzDelSur.Datos.Carga.Programacion_Ruta          oBL_Programacion_Ruta = new UPC.CruzDelSur.Datos.Carga.Programacion_Ruta();
                    UPC.CruzDelSur.Negocio.Modelo.Carga.Programacion_Ruta oBE_Programacion_Ruta = oBL_Programacion_Ruta.f_UnoProgramacion_Ruta(Int32.Parse(oBEMG_ES01_FichaCarga.CODIGO_PROGRAMACION_RUTA.ToString()));
                    lblAgenciaOrigen.Text  = oBE_Programacion_Ruta.ORIGEN;
                    lblAgenciaDestino.Text = oBE_Programacion_Ruta.DESTINO;
                    UPC.CruzDelSur.Datos.Carga.Cliente          oBL_Cliente = new UPC.CruzDelSur.Datos.Carga.Cliente();
                    UPC.CruzDelSur.Negocio.Modelo.Carga.Cliente oBE_Cliente = oBL_Cliente.f_UnoCliente(oBEMG_ES01_FichaCarga.CLIENTE_ORIGEN);
                    lblRemitente.Text = String.Concat(oBE_Cliente.NOMBRES, " ", oBE_Cliente.APELLIDOS);
                    UPC.CruzDelSur.Negocio.Modelo.Carga.Cliente oBE_Cliente2 = oBL_Cliente.f_UnoCliente(oBEMG_ES01_FichaCarga.CLIENTE_DESTINO);
                    lblDestinatario.Text = String.Concat(oBE_Cliente2.NOMBRES, " ", oBE_Cliente2.APELLIDOS);
                }
            }
        }
Exemple #4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(Context.Request.QueryString["opt"]))
            {
                if (Context.Request.QueryString["opt"] == "1")
                {
                    Session["clave"]     = Seguridad.Encriptar(txtClave.Text.ToString());
                    Session["pregunta"]  = txtPregunta.Text.ToString();
                    Session["respuesta"] = txtRespuesta.Text.ToString();
                    if (!String.IsNullOrEmpty(Context.Request.QueryString["idcarga"]))
                    {
                        if (txtRespuesta.Text.ToUpper().Trim().ToString() != hfRespuesta.Value.ToUpper().Trim().ToString())
                        {
                            this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('La respuesta no coincide con la información general de la ficha carga');</script>"));
                        }
                        else
                        {
                            this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('Clave Ingresada'); CloseFormOK();</script>"));
                        }
                    }
                    else
                    {
                        this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('Clave Ingresada'); CloseFormOK();</script>"));
                    }
                }
                if (Context.Request.QueryString["opt"] == "2")
                {
                    UPC.CruzDelSur.Datos.Carga.Carga          oBL_Carga = new UPC.CruzDelSur.Datos.Carga.Carga();
                    UPC.CruzDelSur.Negocio.Modelo.Carga.Carga oBE_Carga = oBL_Carga.f_ListadoUnoCarga(Int32.Parse(Context.Request.QueryString["idcarga"]));



                    if (oBE_Carga.CLAVE_SEGURIDAD == Seguridad.Encriptar(txtClave.Text).ToString())
                    {
                        this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('El código Ingresado es correcto'); CloseFormOK();</script>"));
                        int o = oBL_Carga.f_ActualizarEstadoCarga("Entregado", Context.Request.QueryString["idcarga"]);
                    }
                    else
                    {
                        this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('Clave ingresada no es valida, no se puede validar la carga'); CloseFormOK();</script>"));
                    }
                }
            }
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(Context.Request.QueryString["idficha"]))
            {
                hffichacarga.Value = Context.Request.QueryString["idficha"].ToString();


                Session["idcarga2"] = hffichacarga.Value;


                UPC.CruzDelSur.Datos.Carga.Carga          oBL_Carga = new UPC.CruzDelSur.Datos.Carga.Carga();
                UPC.CruzDelSur.Negocio.Modelo.Carga.Carga oBE_Carga = oBL_Carga.f_ListadoUnoCarga(Int32.Parse(hffichacarga.Value));


                txtFicha.Text        = oBE_Carga.FICHA;
                txtObservacion.Text  = oBE_Carga.OBSERVACION;
                lblClave.Text        = oBE_Carga.CLAVE_SEGURIDAD;
                txtImporteTotal.Text = oBE_Carga.DBL_IMPORTETOTAL.ToString();

                txtigv.Text   = oBE_Carga.DBL_IGV.ToString();
                txtTotal.Text = oBE_Carga.DBL_TOTAL.ToString();

                txtPesoTotal.Text         = oBE_Carga.DBL_PESOTOTAL.ToString();
                ddlTipoPago.SelectedValue = oBE_Carga.TIPO_PAGO.ToString();


                UPC.CruzDelSur.Datos.Carga.DetalleCarga oBL_DetalleCarga = new UPC.CruzDelSur.Datos.Carga.DetalleCarga();


                if (Session["ListaProducto2"] == null)
                {
                    Session["ListaProducto2"] = oBL_DetalleCarga.f_ListaDetalleCarga(Int32.Parse(hffichacarga.Value));
                }



                Session["idProgramacionRuta2"] = oBE_Carga.CODIGO_PROGRAMACION_RUTA;
                Session["idRemitente2"]        = oBE_Carga.CLIENTE_ORIGEN;
                Session["idDestinatario2"]     = oBE_Carga.CLIENTE_DESTINO;
            }


            if (Session["idProgramacionRuta2"] != null)
            {
                //CREAMOS LOS PARAMETROS

                UPC.CruzDelSur.Datos.Carga.Programacion_Ruta oBL_Programacion_Ruta = new UPC.CruzDelSur.Datos.Carga.Programacion_Ruta();

                UPC.CruzDelSur.Negocio.Modelo.Carga.Programacion_Ruta oBE_Programacion_Ruta = oBL_Programacion_Ruta.f_UnoProgramacion_Ruta(Int32.Parse(Session["idProgramacionRuta2"].ToString()));


                ddlAgenciaDestino.SelectedValue = oBE_Programacion_Ruta.CODIGO_AGENCIADESTINO.ToString();
                txtFechasalida.Text             = oBE_Programacion_Ruta.FECHA_ORIGEN.Value.ToShortDateString();
                txtfechallegada.Text            = oBE_Programacion_Ruta.FECHA_DESTINO.Value.ToShortDateString();
                MK_ProgramacionRuta_ID.Value    = oBE_Programacion_Ruta.CODIGO_PROGRAMACION_RUTA.ToString();
                txtUnidadTransporte.Text        = oBE_Programacion_Ruta.PLACA.ToString();
            }


            //    if (Session["clave"] != null)
            //    {
            //        lblClave.Text = Session["clave"].ToString();
            //    }

            if (Session["idRemitente2"] != null)
            {
                UPC.CruzDelSur.Datos.Carga.Cliente          oBL_Cliente = new UPC.CruzDelSur.Datos.Carga.Cliente();
                UPC.CruzDelSur.Negocio.Modelo.Carga.Cliente oCliente    = oBL_Cliente.f_UnoCliente(Session["idRemitente2"].ToString());
                txtRemitente.Text     = String.Concat(oCliente.NOMBRES, " ", oCliente.APELLIDOS);
                txtDniRemitente.Text  = oCliente.DOCUMENTO;
                HFIdClienteRemi.Value = oCliente.DOCUMENTO;
            }
            if (Session["idDestinatario2"] != null)
            {
                UPC.CruzDelSur.Datos.Carga.Cliente          oBL_Cliente = new UPC.CruzDelSur.Datos.Carga.Cliente();
                UPC.CruzDelSur.Negocio.Modelo.Carga.Cliente oCliente    = oBL_Cliente.f_UnoCliente(Session["idDestinatario2"].ToString());

                txtDestinatario.Text    = String.Concat(oCliente.NOMBRES, " ", oCliente.APELLIDOS);
                txtDNIDestinatario.Text = oCliente.DOCUMENTO;

                HFIdClienteDest.Value = oCliente.DOCUMENTO;
            }



            List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga> ListaProducto = new List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga>();

            if (Session["ListaProducto2"] != null)
            {
                ListaProducto = (List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga>)Session["ListaProducto2"];
            }
            else
            {
                gvProductos.DataSource = null;
                gvProductos.DataBind();
            }
            if (Session["idProducto2"] != null)
            {
                UPC.CruzDelSur.Datos.Carga.Producto          oBL_Producto = new UPC.CruzDelSur.Datos.Carga.Producto();
                UPC.CruzDelSur.Negocio.Modelo.Carga.Producto oBE_Producto = oBL_Producto.f_ListadoUnoProducto(Int32.Parse(Session["idProducto2"].ToString()));


                ListaProducto.RemoveAll(item2 => item2.CODIGO_PRODUCTO == oBE_Producto.CODIGO_PRODUCTO);
                ListaProducto.RemoveAll(item2 => item2.CODIGO_PRODUCTO == 0);

                UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga oBE_DetalleCarga = new UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga();
                oBE_DetalleCarga.CODIGO_PRODUCTO = oBE_Producto.CODIGO_PRODUCTO;
                oBE_DetalleCarga.DESCRIPCION     = oBE_Producto.DESCRIPCION;
                oBE_DetalleCarga.PRECIO          = oBE_Producto.PRECIO;
                ListaProducto.Add(oBE_DetalleCarga);

                Session["ListaProducto2"] = ListaProducto;
            }
            if (Session["clave2"] != null)
            {
                lblClave.Text = Session["clave2"].ToString();
            }



            gvProductos.DataSource = ListaProducto;
            gvProductos.DataBind();



            //    //}

            //}
            //protected void setInfo()
            //{
            //    ViewState["codigoFicha"] = txtFicha.Text;
            //}
            //protected void GetInfo()
            //{
            //    txtFicha.Text = ViewState["codigoFicha"].ToString();
            this.Controls.Add(new LiteralControl("<script language='JavaScript'> window.print(); </script>"));
        }
 void CargarFichas()
 {
     UPC.CruzDelSur.Datos.Carga.Carga oBL_Carga = new UPC.CruzDelSur.Datos.Carga.Carga();
     gvfichacarga.DataSource = oBL_Carga.f_ListadoCarga(DdlCriterio.SelectedValue.ToString(), txtdato.Text.Trim().ToString());
     gvfichacarga.DataBind();
 }
Exemple #7
0
        protected void btnAceptar_Click(object sender, EventArgs e)
        {
            if (gvProductos.Rows.Count == 0)
            {
                this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('Debe Seleccionar Productos'); </script>"));
                return;
            }

            if (lblClave.Text.Trim().ToString().Length == 0)
            {
                this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('Debe Ingresar la clave de seguridad'); </script>"));
                return;
            }



            UPC.CruzDelSur.Negocio.Modelo.Carga.Carga oBE_Carga = new UPC.CruzDelSur.Negocio.Modelo.Carga.Carga();
            oBE_Carga.CODIGO_CARGA = Int32.Parse(hffichacarga.Value);

            List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga> oListaDetalleFCargaDTO = new List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga>();
            Double importetotal = 0;
            Double pesototal    = 0;

            foreach (GridViewRow row in gvProductos.Rows)
            {
                UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga oDetalleFCargaDTO = new UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga();


                UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga oBEMG_ES03_Producto = (UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga)row.DataItem;


                TextBox txtCantidad = row.FindControl("txtCantidad") as TextBox;
                TextBox txtPeso     = (TextBox)row.FindControl("txtPeso");

                TextBox      txtimporte   = (TextBox)row.FindControl("txtimporte");
                DropDownList ddlTipoCarga = (DropDownList)row.FindControl("ddlTipoCarga");

                importetotal += double.Parse(txtimporte.Text);
                pesototal    += double.Parse(txtPeso.Text);



                oDetalleFCargaDTO.CANTIDAD        = Int32.Parse(txtCantidad.Text);
                oDetalleFCargaDTO.DESCRIPCION     = row.Cells[1].Text;
                oDetalleFCargaDTO.CODIGO_PRODUCTO = Int32.Parse(row.Cells[0].Text);
                oDetalleFCargaDTO.DBL_IMPORTE     = double.Parse(txtimporte.Text);
                oDetalleFCargaDTO.DBL_PESO        = double.Parse(txtPeso.Text);

                oDetalleFCargaDTO.TIPO_CARGA = Int32.Parse(ddlTipoCarga.SelectedValue);

                oDetalleFCargaDTO.CODIGO_CARGA = oBE_Carga.CODIGO_CARGA;
                oListaDetalleFCargaDTO.Add(oDetalleFCargaDTO);
            }
            oBE_Carga.CLAVE_SEGURIDAD     = Session["clave"].ToString();;
            oBE_Carga.PREGUNTA_SEGURIDAD  = HFPregunta.Value;
            oBE_Carga.RESPUESTA_SEGURIDAD = HFRespuesta.Value;
            oBE_Carga.DESTINATARIO        = txtDestinatario.Text;
            oBE_Carga.CLIENTE_DESTINO     = HFIdClienteDest.Value;
            oBE_Carga.DESTINATARIO        = txtDestinatario.Text;
            oBE_Carga.ESTADO           = "Registrado";
            oBE_Carga.CODIGO_GUIA      = null;
            oBE_Carga.ESTADOPAGO       = ddlTipoPago.SelectedValue;
            oBE_Carga.FECHA_REGISTRO   = DateTime.Now.Date;
            oBE_Carga.FICHA            = txtFicha.Text;
            oBE_Carga.CLIENTE_ORIGEN   = HFIdClienteRemi.Value;
            oBE_Carga.REMITENTE        = txtRemitente.Text;
            oBE_Carga.DBL_IMPORTETOTAL = importetotal;
            oBE_Carga.OBSERVACION      = txtObservacion.Text;
            oBE_Carga.DBL_PESOTOTAL    = pesototal;


            txtigv.Text   = (importetotal * 0.18).ToString();
            txtTotal.Text = (importetotal * 1.18).ToString();


            oBE_Carga.DBL_IGV   = (importetotal * 0.18);
            oBE_Carga.DBL_TOTAL = (importetotal * 1.18);

            oBE_Carga.CODIGO_PROGRAMACION_RUTA = int.Parse(MK_ProgramacionRuta_ID.Value);
            oBE_Carga.oDetalleCarga            = oListaDetalleFCargaDTO;

            UPC.CruzDelSur.Datos.Carga.Carga oBL_Carga = new UPC.CruzDelSur.Datos.Carga.Carga();



            int resultado = oBL_Carga.f_AgregarCarga(oBE_Carga);



            this.Controls.Add(new LiteralControl("<script language='JavaScript'>alert('El Registro se realizo con exito'); window.location = 'ListadoFichaCarga.aspx'; </script>"));
            //Response.Redirect("ListadoFichaCarga.aspx");
        }
Exemple #8
0
        //ServletGestionCarga _servletGestionCarga = new ServletGestionCarga();


        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                UPC.CruzDelSur.Datos.Carga.Carga CodigoFicha = new UPC.CruzDelSur.Datos.Carga.Carga();

                UPC.CruzDelSur.Datos.Carga.Agencia blAgencia = new UPC.CruzDelSur.Datos.Carga.Agencia();


                ddlAgenciaOrigen.DataSource     = blAgencia.f_ListadoAgencia();
                ddlAgenciaOrigen.DataValueField = "CODIGO_AGENCIA";
                ddlAgenciaOrigen.DataTextField  = "NOMBRE";
                ddlAgenciaOrigen.DataBind();


                ddlAgenciaDestino.DataSource     = blAgencia.f_ListadoAgencia();
                ddlAgenciaDestino.DataValueField = "CODIGO_AGENCIA";
                ddlAgenciaDestino.DataTextField  = "NOMBRE";
                ddlAgenciaDestino.DataBind();



                txtFicha.Text = CodigoFicha.f_GenerarNumero();
                if (!String.IsNullOrEmpty(Context.Request.QueryString["idficha"]))
                {
                    hffichacarga.Value = Context.Request.QueryString["idficha"].ToString();


                    Session["idcarga"] = hffichacarga.Value;


                    UPC.CruzDelSur.Datos.Carga.Carga          oBL_Carga = new UPC.CruzDelSur.Datos.Carga.Carga();
                    UPC.CruzDelSur.Negocio.Modelo.Carga.Carga oBE_Carga = oBL_Carga.f_ListadoUnoCarga(Int32.Parse(hffichacarga.Value));


                    txtFicha.Text             = oBE_Carga.FICHA;
                    txtObservacion.Text       = oBE_Carga.OBSERVACION;
                    lblClave.Text             = oBE_Carga.CLAVE_SEGURIDAD;
                    txtImporteTotal.Text      = oBE_Carga.DBL_IMPORTETOTAL.ToString();
                    txtPesoTotal.Text         = oBE_Carga.DBL_PESOTOTAL.ToString();
                    ddlTipoPago.SelectedValue = oBE_Carga.TIPO_PAGO.ToString();


                    UPC.CruzDelSur.Datos.Carga.DetalleCarga oBL_DetalleCarga = new UPC.CruzDelSur.Datos.Carga.DetalleCarga();


                    Session["idProgramacionRuta"] = oBE_Carga.CODIGO_PROGRAMACION_RUTA;
                    Session["idRemitente"]        = oBE_Carga.CLIENTE_ORIGEN;
                    Session["idDestinatario"]     = oBE_Carga.CLIENTE_DESTINO;


                    if (Session["ListaProducto"] == null)
                    {
                        Session["ListaProducto"] = oBL_DetalleCarga.f_ListaDetalleCarga(Int32.Parse(hffichacarga.Value));
                    }



                    if (Session["idRemitente"] != null)
                    {
                        UPC.CruzDelSur.Datos.Carga.Cliente          oBL_Cliente = new UPC.CruzDelSur.Datos.Carga.Cliente();
                        UPC.CruzDelSur.Negocio.Modelo.Carga.Cliente oCliente    = oBL_Cliente.f_UnoCliente(Session["idRemitente"].ToString());
                        txtRemitente.Text     = String.Concat(oCliente.NOMBRES, " ", oCliente.APELLIDOS);
                        txtDniRemitente.Text  = oCliente.DOCUMENTO;
                        HFIdClienteRemi.Value = oCliente.DOCUMENTO;
                    }
                    if (Session["idDestinatario"] != null)
                    {
                        UPC.CruzDelSur.Datos.Carga.Cliente          oBL_Cliente = new UPC.CruzDelSur.Datos.Carga.Cliente();
                        UPC.CruzDelSur.Negocio.Modelo.Carga.Cliente oCliente    = oBL_Cliente.f_UnoCliente(Session["idDestinatario"].ToString());

                        txtDestinatario.Text    = String.Concat(oCliente.NOMBRES, " ", oCliente.APELLIDOS);
                        txtDNIDestinatario.Text = oCliente.DOCUMENTO;

                        HFIdClienteDest.Value = oCliente.DOCUMENTO;
                    }
                }
            }



            if (Session["idProgramacionRuta"] != null)
            {
                //CREAMOS LOS PARAMETROS

                UPC.CruzDelSur.Datos.Carga.Programacion_Ruta oBL_Programacion_Ruta = new UPC.CruzDelSur.Datos.Carga.Programacion_Ruta();

                UPC.CruzDelSur.Negocio.Modelo.Carga.Programacion_Ruta oBE_Programacion_Ruta = oBL_Programacion_Ruta.f_UnoProgramacion_Ruta(Int32.Parse(Session["idProgramacionRuta"].ToString()));


                ddlAgenciaDestino.SelectedValue = oBE_Programacion_Ruta.CODIGO_AGENCIADESTINO.ToString();
                txtFechasalida.Text             = oBE_Programacion_Ruta.FECHA_ORIGEN.Value.ToShortDateString();
                txtfechallegada.Text            = oBE_Programacion_Ruta.FECHA_DESTINO.Value.ToShortDateString();
                MK_ProgramacionRuta_ID.Value    = oBE_Programacion_Ruta.CODIGO_PROGRAMACION_RUTA.ToString();
                txtUnidadTransporte.Text        = oBE_Programacion_Ruta.PLACA.ToString();
            }


            //    if (Session["clave"] != null)
            //    {
            //        lblClave.Text = Session["clave"].ToString();
            //    }



            List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga> ListaProducto = new List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga>();

            if (Session["ListaProducto"] != null)
            {
                ListaProducto = (List <UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga>)Session["ListaProducto"];
            }
            else
            {
                gvProductos.DataSource = null;
                gvProductos.DataBind();
            }
            if (Session["idProducto"] != null)
            {
                UPC.CruzDelSur.Datos.Carga.Producto          oBL_Producto = new UPC.CruzDelSur.Datos.Carga.Producto();
                UPC.CruzDelSur.Negocio.Modelo.Carga.Producto oBE_Producto = oBL_Producto.f_ListadoUnoProducto(Int32.Parse(Session["idProducto"].ToString()));


                ListaProducto.RemoveAll(item => item.CODIGO_PRODUCTO == oBE_Producto.CODIGO_PRODUCTO);
                ListaProducto.RemoveAll(item => item.CODIGO_PRODUCTO == 0);

                UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga oBE_DetalleCarga = new UPC.CruzDelSur.Negocio.Modelo.Carga.DetalleCarga();
                oBE_DetalleCarga.CODIGO_PRODUCTO = oBE_Producto.CODIGO_PRODUCTO;
                oBE_DetalleCarga.DESCRIPCION     = oBE_Producto.DESCRIPCION;
                oBE_DetalleCarga.PRECIO          = oBE_Producto.PRECIO;
                ListaProducto.Add(oBE_DetalleCarga);

                Session["ListaProducto"] = ListaProducto;
            }
            if (Session["clave"] != null)
            {
                lblClave.Text     = "******";
                HFPregunta.Value  = Session["pregunta"].ToString();
                HFRespuesta.Value = Session["respuesta"].ToString();
            }


            if (gvProductos.Rows.Count != ListaProducto.Count())
            {
                gvProductos.DataSource = ListaProducto;
                gvProductos.DataBind();
            }



            CalculaPesoTotalImporteTotal();

            //    //}

            //}
            //protected void setInfo()
            //{
            //    ViewState["codigoFicha"] = txtFicha.Text;
            //}
            //protected void GetInfo()
            //{
            //    txtFicha.Text = ViewState["codigoFicha"].ToString();
        }