Ver Mensaje Individual
  #1  
Antiguo 30-09-2003
Rolando Rolando is offline
Registrado
 
Registrado: sep 2003
Ubicación: México
Posts: 3
Reputación: 0
Rolando Va por buen camino
Question forms y edits

Hola y gracias por ver este hilo, Tengo una duda que tengo que
hacer para que en los edits pueda insertar informacion y esa informacion capturada se pueda ver en el DbGrid (este DBGrid es nada mas para visualizar la informacion de los edits).
te agradeceria mucho si me dices que hacer. GRACIAS......

unit DatosG1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables, Grids, DBGrids, ExtCtrls, DBCtrls,
Buttons;

type
TForm2 = class(TForm)
DBGrid1: TDBGrid;
ds_DatosGenerales: TDataSource;
tb_DatosGenerales: TTable;
tb_DatosGeneralesID_DatosGenerales: TSmallintField;
tb_DatosGeneralesNombre: TStringField;
tb_DatosGeneralesAoN: TSmallintField;
tb_DatosGeneralesMesN: TSmallintField;
tb_DatosGeneralesDiaN: TSmallintField;
tb_DatosGeneralesAoA: TSmallintField;
tb_DatosGeneralesMesA: TSmallintField;
tb_DatosGeneralesDiaA: TSmallintField;
Button1: TButton;
BT_INSERT: TBitBtn;
BT_EDITAR: TBitBtn;
BT_ACEPTAR: TBitBtn;
BT_CANCEL: TBitBtn;
BT_SALIR: TBitBtn;
DBNavigator1: TDBNavigator;
Panel1: TPanel;
Button2: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit5: TEdit;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Edit6: TEdit;
Edit7: TEdit;
DBNavigator2: TDBNavigator;
Label1: TLabel;
Edit8: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure Database1Login(Database: TDatabase; LoginParams: TStrings);
procedure BT_SALIRClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
Close;
end;

procedure TForm2.FormActivate(Sender: TObject);
begin
tb_DatosGenerales.Active:=true;
Edit1.Enabled := true;
Edit2.Enabled := true;
Edit3.Enabled := true;
Edit4.Enabled := true;
Edit5.Enabled := true;
Edit6.Enabled := true;
Edit7.Enabled := true;
Edit8.Enabled := true;
tb_DatosGenerales.REFRESH;
end;

procedure TForm2.Database1Login(Database: TDatabase;
LoginParams: TStrings);
begin
LoginParams.Values['USER NAME'] :='';
LoginParams.Values['PASSWORD'] :='';

end;

procedure TForm2.BT_SALIRClick(Sender: TObject);
begin
Close;
end;

end.
Responder Con Cita