Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 30-11-2007
Yosihey Yosihey is offline
Registrado
 
Registrado: oct 2007
Posts: 1
Poder: 0
Yosihey Va por buen camino
Exclamation Guardar registros

Hola, tengo un prgrama para facturar, pero tmb necesito que guarde los registros que ingreso y haga consultas de esos registros, me dijieron que lo hiciera con arreglos y variables tipo record, ya lo hice pero al ponerle guardar no me los guarda, Queria ver si alguien me pudiera ayudar, aqui esta el codigo para que me digan en que le estoy errando, de antemano gracias:

Código Delphi [-]
unit factura;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Buttons, jpeg;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Label7: TLabel;
    Label8: TLabel;
    Edit4: TEdit;
    Label9: TLabel;
    Image1: TImage;
    botonsalir: TBitBtn;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Timer1: TTimer;
    Label13: TLabel;
    Label17: TLabel;
    Label18: TLabel;
    BitBtn1: TBitBtn;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Edit5: TEdit;
    Label14: TLabel;
    Edit6: TEdit;
    Button1: TButton;
    Button2: TButton;
    procedure botonsalirClick(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure ComboBox1Change(Sender: TObject);
    procedure ComboBox2Change(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  cont1: integer;
  fecha: Tdate;
  clientes : record
  nombre:  string;
  direccion: string;
  telefono: integer;
  rfc:  string;
  ciudad: string;
  end;
  facturas : record
  numfactura: integer;
  rfc: string;
  end;
  Acliente:array[1..5] of string;
  Afactura: array[1..3] of string;

const
  Alcatel560=499;
  Benq100=450;
  Nokia6101=1049;
  Nokia6131=2199;
  Nokia5300=2190;
  Nokia5200=1799;
  Nokia3250=3700;
  MotorolaF3=299;
  MotorolaV3e=2500;
  MotorolaZ3=3500;

implementation

{$R *.dfm}

procedure TForm1.botonsalirClick(Sender: TObject);
begin
        close;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
      label9.Caption:=datetostr(date);
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
var
   costo: string;
begin

end;







procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  Close;
end;

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if combobox1.Text = 'Alcatel560' then
        label13.Caption:=inttostr(Alcatel560);
        if combobox1.Text = 'Benq100' then
         label13.Caption:=inttostr(Benq100);
            if combobox1.Text = 'Nokia6101' then
         label13.Caption:=inttostr(Nokia6101);
              if combobox1.Text = 'Nokia6131' then
         label13.Caption:=inttostr(Nokia6131);
                if combobox1.Text = 'Nokia5300' then
         label13.Caption:=inttostr(Nokia5300);
                   if combobox1.Text = 'Nokia5200' then
         label13.Caption:=inttostr(Nokia5200);
                       if combobox1.Text = 'Nokia3250' then
         label13.Caption:=inttostr(Nokia3250);
                            if combobox1.Text = 'MotorolaF3' then
         label13.Caption:=inttostr(MotorolaF3);
                                if combobox1.Text = 'MotorolaV3e' then
         label13.Caption:=inttostr(MotorolaV3e);
                                    if combobox1.Text = 'MotorolaZ3' then
         label13.Caption:=inttostr(MotorolaZ3);









end;

procedure TForm1.ComboBox2Change(Sender: TObject);
begin
        if combobox2.Text = '1' then
              edit5.Text:= label13.Caption;
                if combobox2.Text = '2' then
                  edit5.Text:= inttostr(strtoint(label13.Caption)*2);
                    if combobox2.Text =  '3' then
                     edit5.Text:= inttostr(strtoint(label13.Caption)*3);


end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Acliente[1]:= edit1.text;
Acliente[2]:= edit2.text;
Acliente[3]:= edit3.text;
Acliente[4]:= edit6.text;
Acliente[5]:= edit4.text;
Afactura[1]:= edit4.text;
Afactura[2]:= label9.Caption;
Afactura[3]:= edit3.text;
cont1:=cont1+1;




end;

procedure TForm1.FormCreate(Sender: TObject);
begin
    cont1 := 0;
end;

end.

Última edición por dec fecha: 30-11-2007 a las 01:55:01.
Responder Con Cita
 



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
Guardar en tabla registros Petolansa Varios 5 13-11-2007 00:51:28
Filtrar registros y guardar en Array Deiv SQL 15 01-08-2007 15:09:41
Guardar Registros en diferentes tablas Darlingkarina SQL 4 12-07-2006 01:43:30
Problemas para guardar registros Nelly Varios 1 19-01-2006 23:22:02
paradox 7 guardar registros Mariana Conexión con bases de datos 3 12-11-2004 18:16:28


La franja horaria es GMT +2. Ahora son las 08:09:30.


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