Club Delphi  
    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

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 30-09-2003
Rolando Rolando is offline
Registrado
 
Registrado: sep 2003
Ubicación: México
Posts: 3
Poder: 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
  #2  
Antiguo 01-10-2003
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Poder: 10
marcoszorrilla Va por buen camino
Por ejemplo:

En un botón pones algo como:
Código:
tb_DatosGenerales.Edit;
tb_DatosGeneralesID_DatosGenerales.Value:=StrToInt(Edit1.Text);
//Resto de los campos lo mismo
tb_DatosGenerales.Post;
Un Saludo.
__________________
Guía de Estilo de los Foros
Cita:
- Ça c'est la caisse. Le mouton que tu veux est dedans.
Responder Con Cita
  #3  
Antiguo 01-10-2003
Rolando Rolando is offline
Registrado
 
Registrado: sep 2003
Ubicación: México
Posts: 3
Poder: 0
Rolando Va por buen camino
Thumbs up

Muhas gracias por la informacion me sirvio de mucho nos estamos viendo
Responder Con Cita
Respuesta


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


La franja horaria es GMT +2. Ahora son las 23:34:09.


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