Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guνa de estilo Buscar Temas de Hoy Marcar Foros Como Leνdos

Coloboraciσn Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 10-06-2008
Avatar de Caro
*Caro* Caro is offline
Moderadora
 
Registrado: jul 2004
Ubicaciσn: Cochabamba, Bolivia
Posts: 2.544
Poder: 24
Caro Va por buen camino
Hola de nuevo Paulao, la primera funciσn no he cambiado nada, lo que esta dentro del boton si, te pongo el codigo, no se si te he entendido bien, pero de hecho tienes que seguir haciendo mas controles.

Cσdigo Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
 Archivo  : TextFile;
 Linea    : String;
 BandItem,
 BandCabecera : Boolean;
 PosInicio, PosItem, PosIt  : Integer;
 CadItem,
 Cadena   : String;
begin
 AssignFile(Archivo, 'pru.txt');
 Reset(Archivo);
 BandItem := False;
 BandCabecera := False;
 Cadena := '';
 While not Eof(Archivo) do
  begin
   Readln(Archivo, Linea);
   PosItem := Pos('ITEM', Linea);
   if (PosItem<>0) or (BandItem) then
    begin
     BandItem := True;
     if BandCabecera=False then
      begin
       Memo1.Lines.Add(Cadena);
       BandCabecera := True;
      end;
     CadItem := Copy(Linea, 3, Length(Linea));
     PosIt := Pos(' ',CadItem);
     if PosIt>0 then
      CadItem := Copy(CadItem, 1, PosIt-1);
     Memo1.Lines.Add(CadItem);
     if Pos('SUBTOTAL', Linea)>0 then
      BandItem := False;
    end
   else
    begin
     PosInicio := Pos('CCF:', Linea);
     if PosInicio>0 then
      begin
       Cadena := Cadena + Contenido(Linea, 'CCF:',PosInicio);
       PosInicio := 0;
      end;
     PosInicio := Pos('COO:', Linea);
     if PosInicio>0 then
      begin
       Cadena := Cadena + Contenido(Linea, 'COO:',PosInicio);
       PosInicio := 0;
      end;
     PosInicio := Pos('CNPJ/CPF CONSUMIDOR:', Linea);
     if PosInicio>0 then
      begin
       Cadena := Cadena + Contenido(Linea, 'CNPJ/CPF CONSUMIDOR:',PosInicio);
       PosInicio := 0;
      end;
     PosInicio := Pos('NOME:', Linea);
     if PosInicio>0 then
      begin
       Cadena := Cadena + Contenido(Linea, 'NOME:',PosInicio);
       PosInicio := 0;
      end;
    end;
  end;
end;

Saluditos
__________________
Disfruten cada minuto de su vida a lado de sus seres queridos como si fuese el ultimo, uno nunca sabe lo que puede pasar.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Bϊsqueda Avanzada
Desplegado

Normas de Publicaciσn
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El cσdigo vB estα habilitado
Las caritas estαn habilitado
Cσdigo [IMG] estα habilitado
Cσdigo HTML estα deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Ϊltimo mensaje
ftFmtMemo to text johurgi Varios 1 20-10-2006 17:45:01
Duda sobre Archivos enviados por medio de firebird sin guardarlo en la BD RONPABLO Firebird e Interbase 6 13-10-2006 23:49:44
Guardar lo que tengo en un Edit1.text y edit2.text en una base de datos firebird jorgeluisc Conexiσn con bases de datos 1 23-04-2006 18:29:28
Convertir Archivos DFM de binario a Texto (Text DFM) DiDi Varios 4 21-04-2005 19:39:43
duda sobre archivos de texto eduarcol Varios 4 05-02-2004 15:06:31


La franja horaria es GMT +2. Ahora son las 15:25:22.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducciσn al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi