Foros del Web » Programando para Internet » ASPX (.net) »

Problemas con archivos secuenciales

Estas en el tema de Problemas con archivos secuenciales en el foro de ASPX (.net) en Foros del Web. Soy nuevo en esto de programar en paginas web. a ver si me podéis hechar una mano. la cuestión es que tengo un webform con ...
  #1 (permalink)  
Antiguo 16/05/2011, 12:50
 
Fecha de Ingreso: mayo-2011
Mensajes: 16
Antigüedad: 13 años
Puntos: 0
Mensaje Problemas con archivos secuenciales

Soy nuevo en esto de programar en paginas web. a ver si me podéis hechar una mano.

la cuestión es que tengo un webform con txt , un calendar y un button.

<%@ Page Language="VB" MasterPageFile="~/Airportservices/AirportServices.master" AutoEventWireup="false" CodeFile="Embarque.aspx.vb" Inherits="Airportservices_Embarque" title="Buscar Vuelo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<asp:TextBox ID="TextBoxBuscar" runat="server" MaxLength="8" Style="font-size: 14pt;
vertical-align: middle; color: black; border-top-style: double; font-style: italic;
font-family: 'Arial Narrow'; border-right-style: double; border-left-style: double;
letter-spacing: normal; text-align: center; border-bottom-style: double"></asp:TextBox></td>
<td style="width: 136px; height: 26px;">
</td>
</tr>
</td>
<td style="height: 21px;" colspan="3">
<asp:Calendar ID="Calendar1" runat="server" BackColor="#FFFFCC"
</asp:Calendar>
</td>
<td style="width: 136px; height: 21px;">
<asp:Button ID="ButtonEmbarque" runat="server" BackColor="Blue" BorderColor="#C00000"
BorderStyle="Double" Style="font-size: 14pt; border-top-style: double; border-right-style: double;
border-left-style: double; border-bottom-style: double" Text="Mostrar Ficha"
Width="141px" /></td>
</tr>
<tr>
<
</td>
</tr>
</table>
</asp:Content>

al seleccionar el button
me tiene que abrir una pagina nueva y cargar unos datos en los lbl y los txt
teniendo en cuenta la fecha .
si la fecha es la de hoy busco el archivo p:\mappers.pv
pero si la fecha es anterior tengo que buscar en la carpeta p:\sv
y buscar el archivo la fecha en formato texto (ddmmyy)
un ej seria la fecha 02/05/11
buscar el archivo 020511s.sv

en su momento lo cree para visual basic.
y ahorra lo estoy intentando para web.

en aquel entonces usaba el dtpfecha .

Dim Fso As New FileSystemObject
Dim ts As TextStream
Dim strCodigo As String
Dim strLinea As String
Fso.CopyFile "P:\mapperS.pv", "C:\gonzalez\temporal\MAPPERS.PV"
Set ts = Fso.OpenTextFile("C:\gonzalez\temporal\MAPPERS.PV" )
strCodigo = UCase(text1.Text) & Format(DTPFecha, "ddYYYYMM")
Do While Not (ts.AtEndOfStream)
strLinea = ts.ReadLine
If strCodigo = Left(strLinea, Len(strCodigo)) Then
SVALOR1 = Mid(strLinea, 1, 8)
Dim datFecha As Date
Dim sCodigo As String
sCodigo = Mid(strLinea, 9, 8)
datFecha = DateSerial(Mid(sCodigo, 3, 4), Mid(sCodigo, 7, 2), Mid(sCodigo, 1, 2))
SVALOR3 = Mid(strLinea, 19, 4)
SVALOR4 = Mid(strLinea, 61, 4)
SVALOR5 = Mid(strLinea, 23, 3)
SVALOR6 = Mid(strLinea, 42, 3)
Exit Do
End If
Loop
FichaEmbForm.lblvuelosalida.Caption = SVALOR1
FichaEmbForm.lblfecha_salida.Caption = Format(datFecha, "dd/mm/yyyy")
FichaEmbForm.lblhora_std.Caption = SVALOR3
FichaEmbForm.txthora_cetd.Text = SVALOR4
FichaEmbForm.txtdest1.Text = SVALOR5
FichaEmbForm.txtdest2.Text = SVALOR6
FichaEmbForm.txtreg.Text = SVALOR7
FichaEmbForm.txtpkn_s.Text = SVALOR8
FichaEmbForm.txtgate.Text = SVALOR9
FichaEmbForm.txtslot.Text = SVALOR10
FichaEmbForm.txtversion.Text = SVALOR11 & "/" & SVALOR11A & "/" & SVALOR11B
FichaEmbForm.txtprevision.Text = SVALOR12 & "/" & SVALOR12A & "/" & SVALOR12B
FichaEmbForm.txtfacturados.Text = SVALOR13 & "/" & SVALOR13A & "/" & SVALOR13B & "+" & SVALOR13C
este era para la fecha de hoy

esto en web no es valido

la segunda pagina SERIA

<%@ Page Language="VB" MasterPageFile="~/Airportservices/AirportServices.master" AutoEventWireup="false" CodeFile="Embarqueficha.aspx.vb" Inherits="Airportservices_Embarqueficha" title="Ficha de Embarque" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="border-top-style: double; border-right-style: double; border-left-style: double;
border-bottom-style: double" id="TABLE1">
<tr>
<td style="width: 100px; height: 27px; text-align: center; border-top-style: double; border-right-style: double; border-left-style: double; border-bottom-style: double;" background="../Imagenes/shape20929234.gif">
<span style="font-size: 9pt">Salida<br />
<br />
<asp:Label ID="Labelvuelo_s" runat="server" Text="Vuelo_s"></asp:Label><br />
<br />
<asp:Label ID="LabelFecha_s" runat="server" Text="Fecha_s"></asp:Label></span></td>
<td style="width: 100px; height: 27px;">
</td>
<td style="width: 81px; height: 27px;">
</td>
<td style="height: 27px; border-top-style: double; border-right-style: double; border-left-style: double; text-align: center; border-bottom-style: double;" colspan="6" background="../Imagenes/shape20929234.gif">
<strong>FICHA DE EMBARQUE</strong></td>
<td style="width: 100px; height: 27px;">
</td>

<tr>

</td>
</tr>
<tr>
<td style="width: 100px; border-top-style: double; border-right-style: double; border-left-style: double; text-align: center; border-bottom-style: double;" background="../Imagenes/shape20929234.gif">
<span style="font-size: 9pt">STD<br />
<asp:Label ID="Labelh_std" runat="server" Text="h-std"></asp:Label></span></td>
<td style="width: 100px">
</td>
<td style="width: 81px; border-top-style: double; border-right-style: double; border-left-style: double; text-align: center; border-bottom-style: double;" background="../Imagenes/shape20929234.gif">
<span style="font-size: 9pt">CETD<br />
<asp:TextBox ID="TextBoxcetd" runat="server" Height="12px" Width="30px"></asp:TextBox></span></td>
<td style="width: 100px">
</td>
<td style="vertical-align: text-top; border-top-style: double; border-right-style: double; border-left-style: double; text-align: center; border-bottom-style: double;" background="../Imagenes/shape20929234.gif" colspan="2">
<span style="font-size: 9pt">Dest1 &nbsp; &nbsp;<asp:TextBox ID="TextBoxdest1" runat="server"
Width="37px"></asp:TextBox>
&nbsp;&nbsp;<br />
<br />
Dest 2&nbsp; &nbsp;<asp:TextBox ID="TextBoxdest2" runat="server" Width="31px"></asp:TextBox>
&nbsp;<br />
&nbsp; &nbsp; &nbsp; </span>
</td>
<td style="width: 100px">
</td>
<td style="border-top-style: double; border-right-style: double; border-left-style: double; border-bottom-style: double;" background="../Imagenes/shape20929234.gif" colspan="7">
<span style="font-size: 9pt">REG-S
<asp:TextBox ID="TextBoxreg_s" runat="server" Width="24px"></asp:TextBox>&nbsp;
PKN-S
<asp:TextBox ID="TextBoxpkn_s" runat="server" Width="29px"></asp:TextBox><br />
<br />
GATE
<asp:TextBox ID="TextBox1" runat="server" Width="27px"></asp:TextBox>&nbsp; SLOT&nbsp;
<asp:TextBox ID="TextBox2" runat="server" Width="31px"></asp:TextBox></span></td>
</tr>
<tr>
<td style="width: 100px">
</td>

<td style="width: 100px">
</td>
</tr>
<tr>
<td style="border-top-style: double; border-right-style: double; border-left-style: double; border-bottom-style: double;" background="../Imagenes/shape20929234.gif" colspan="3">
<span style="font-size: 9pt">VERSION &nbsp;&nbsp;<br />
<asp:TextBox ID="TextBox3" runat="server" Width="148px"></asp:TextBox>&nbsp;
<br />
PREVISION&nbsp;<br />
<asp:TextBox ID="TextBox4" runat="server" Width="149px"></asp:TextBox><br />
CIERRE &nbsp; &nbsp;<br />
<asp:TextBox ID="TextBox5" runat="server" Width="147px"></asp:TextBox></span></td>
<td style="width: 100px">
</td>
<td style="width: 100px; vertical-align: top; text-align: center;">
Pax&nbsp;
<br />
Dest1<br />
</td>

</td>
</tr>
</table>
</asp:Content>

si me podrían ir orientando se lo agradecería.

Etiquetas: secuenciales, aspx
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:00.