protected void lstCaso_SelectedIndexChanged(object sender, EventArgs e)
        {
            VentaServiceClient serVenta = new VentaServiceClient();
            DataTable          tabla    = new DataTable();

            try
            {
                string casoEspecial = lstCaso.SelectedValue;

                List <CasosBE> lstDatCasos = new List <CasosBE>(serVenta.RevisionCasosEspeciales(casoEspecial));

                tabla.Columns.Add("Id_Caso");
                tabla.Columns.Add("Tipo_Caso");
                foreach (CasosBE datos in lstDatCasos)
                {
                    tabla.Rows.Add(datos.Id_Casos, datos.Tipo_Caso.Nombre_Caso);
                    gvReporte.DataSource = tabla;
                    gvReporte.DataBind();
                }
            }
            catch (Exception ex)
            {
                Response.Redirect("~/About.aspx");
            }
            finally
            {
                serVenta.Close();
                gvReporte.Visible = true;
            }
        }
        protected void lstCaso_SelectedIndexChanged(object sender, EventArgs e)
        {
            VentaServiceClient serVenta = new VentaServiceClient();
            DataTable tabla = new DataTable();

            try
            {
                string casoEspecial = lstCaso.SelectedValue;

                List<CasosBE> lstDatCasos = new List<CasosBE>(serVenta.RevisionCasosEspeciales(casoEspecial));

                tabla.Columns.Add("Id_Caso");
                tabla.Columns.Add("Tipo_Caso");
                foreach (CasosBE datos in lstDatCasos)
                {
                    tabla.Rows.Add(datos.Id_Casos, datos.Tipo_Caso.Nombre_Caso);
                    gvReporte.DataSource= tabla;
                    gvReporte.DataBind();
                }
            }
            catch (Exception ex)
            {
                Response.Redirect("~/About.aspx");
            }
            finally
            {
                serVenta.Close();
                gvReporte.Visible = true;
            }
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            VentaServiceClient serVenta = new VentaServiceClient();

            try
            {
                var            dato     = Server.UrlDecode(Request.QueryString["Data"]);
                List <CasosBE> lstCasos = new List <CasosBE>(serVenta.RevisionCasosEspeciales(dato));
                foreach (CasosBE consulta in lstCasos)
                {
                    //txtNumCedula.Text = consulta.Venta.IdCliente.Cedula;
                    //txtNombreCliente.Text=consulta.Venta.IdCliente.Nombres_Cliente;
                    //txtPrimerApellido.Text = consulta.Venta.IdCliente.Apellido_1;
                    //txtSegundoApellido.Text = consulta.Venta.IdCliente.Apellido_2;
                    ////foreach (string datos in consulta.Venta.Cliente.ListaDirecciones)
                    ////{
                    ////    txtDireccion.Text= datos;
                    ////}
                    //txtBarrio.Text = consulta.Venta.IdCliente.Ubicacion.Barrio;
                    //txtCiudad.Text = consulta.Venta.IdCliente.Ubicacion.Ciudad.Nombre_Ciudad;
                    //txtDepartamento.Text = consulta.Venta.IdCliente.Ubicacion.Ciudad.Departamento.Nombre_Departamento;
                    //txtTelefono.Text = consulta.Venta.IdCliente.Ubicacion.Telefono_1;
                    // txtObservacion.Text = consulta.Id_Detalle_Venta.Observaciones;
                    txtCasoEspecial.Text = consulta.Tipo_Caso.Nombre_Caso;

                    if (txtCasoEspecial.Text == "Escape")
                    {
                        divEscape.Visible = true;
                        // txtCilAnterior.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Actual;
                        //  txtCilaCambio.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Nuevo;
                    }
                    if (txtCasoEspecial.Text == "Codigo_Errado")
                    {
                        divCodErroneo.Visible = true;
                        //txtCodigoErroneo.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Actual;
                        //txtCodigoCorrecto.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Nuevo;
                    }
                }
            }
            catch (Exception ex)
            {
                Response.Redirect("~/About.aspx");
            }
            finally
            {
                serVenta.Close();
                DivInfoVenta.Visible = true;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            VentaServiceClient serVenta = new VentaServiceClient();
            try
            {
                var dato = Server.UrlDecode(Request.QueryString["Data"]);
                List<CasosBE> lstCasos = new List<CasosBE>(serVenta.RevisionCasosEspeciales(dato));
                foreach(CasosBE consulta in lstCasos)
                {
                    //txtNumCedula.Text = consulta.Venta.IdCliente.Cedula;
                    //txtNombreCliente.Text=consulta.Venta.IdCliente.Nombres_Cliente;
                    //txtPrimerApellido.Text = consulta.Venta.IdCliente.Apellido_1;
                    //txtSegundoApellido.Text = consulta.Venta.IdCliente.Apellido_2;
                    ////foreach (string datos in consulta.Venta.Cliente.ListaDirecciones)
                    ////{
                    ////    txtDireccion.Text= datos;
                    ////}
                    //txtBarrio.Text = consulta.Venta.IdCliente.Ubicacion.Barrio;
                    //txtCiudad.Text = consulta.Venta.IdCliente.Ubicacion.Ciudad.Nombre_Ciudad;
                    //txtDepartamento.Text = consulta.Venta.IdCliente.Ubicacion.Ciudad.Departamento.Nombre_Departamento;
                    //txtTelefono.Text = consulta.Venta.IdCliente.Ubicacion.Telefono_1;
                   // txtObservacion.Text = consulta.Id_Detalle_Venta.Observaciones;
                    txtCasoEspecial.Text = consulta.Tipo_Caso.Nombre_Caso;

                    if (txtCasoEspecial.Text == "Escape")
                    {
                        divEscape.Visible = true;
                       // txtCilAnterior.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Actual;
                      //  txtCilaCambio.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Nuevo;
                    }
                    if (txtCasoEspecial.Text == "Codigo_Errado")
                    {
                        divCodErroneo.Visible = true;
                        //txtCodigoErroneo.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Actual;
                        //txtCodigoCorrecto.Text = consulta.Venta.Detalle_Venta.Cod_Cil_Nuevo;
                    }
                }
            }
            catch (Exception ex)
            {
                Response.Redirect("~/About.aspx");
            }
            finally
            {
                serVenta.Close();
                DivInfoVenta.Visible = true;
            }
        }