Gene Ben ve benim problemlerim
Hocalar kolay gelsin yaf şimdi bi hastane programı yapıyorum yalnız kayıt arama kısmında bi problem var kayıt yapıo ama arama esnasında bilgileri göstermiyo kodları gönderiorum yardımcı olursanız sevinirim...
şimdiden Saolun varolun ALLAHA emanet olun...
Kod: Tümünü seç
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls;
type
kayittipi=record
tc:string[11];
adsoy:string[25];
bad:string[15];
ada:string[15];
bk:string[15];
bkn:string[15];
sy:string[15];
gt:string[15];
ct:string[15];
di:string[15];
rapor:string[100];
rt:string[15];
tutar:string[15];
os:string[20];
taksit:string[25];
end;
TForm1 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
ComboBox1: TComboBox;
Edit5: TEdit;
ComboBox2: TComboBox;
TabSheet2: TTabSheet;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
TabSheet3: TTabSheet;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Button1: TButton;
Edit6: TEdit;
Edit7: TEdit;
Edit8: TEdit;
ListBox1: TListBox;
Edit9: TEdit;
Edit10: TEdit;
ComboBox3: TComboBox;
ListBox2: TListBox;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
dosya:file of kayittipi;
kayit:kayittipi;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
assignfile(dosya,'yener.dat');
{$I-}
reset(dosya);
{$I+};
if IOresult<>0 then rewrite(dosya);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
kayit.tc:=Edit1.Text;
kayit.adsoy:=Edit2.Text;
kayit.bad:=Edit3.Text;
kayit.ada:=edit4.Text;
kayit.bk:=ComboBox1.Text;
kayit.bkn:=edit5.Text;
kayit.sy:=ComboBox2.Text;
kayit.gt:=edit6.Text;
kayit.ct:=edit7.Text;
kayit.di:=edit8.Text;
kayit.rapor:=ListBox1.Items.Text;
kayit.rt:=edit9.Text;
kayit.tutar:=edit10.Text;
kayit.taksit:=ListBox2.Items.Text;
kayit.os:=ComboBox3.Text;
if messagedlg('Kayit Yapılsın mı???',mtInformation,[mbyes,mbno],0)=mryes then
begin
seek(dosya,filesize(dosya));
write;
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
edit6.Text:='';
edit7.Text:='';
ComboBox1.Text:='';
ComboBox2.Text:='';
ComboBox3.Text:='';
ListBox1.Items.Text:='';
ListBox2.Items.Text:='';
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kayit);
if (edit1.Text=kayit.tc)then
begin
edit1.Text:=kayit.tc;
edit2.Text:=kayit.adsoy;
edit3.Text:=kayit.bad;
edit4.Text:=kayit.ada;
ComboBox1.Text:=kayit.bk;
edit5.Text:=kayit.bkn;
ComboBox2.Text:=kayit.sy;
edit6.Text:=kayit.gt;
edit7.Text:=kayit.ct;
edit8.Text:=kayit.di;
ListBox1.Items.Text:=kayit.rapor;
edit9.Text:=kayit.tutar;
ComboBox3.Text:=kayit.os;
ListBox2.Items.Text:=kayit.taksit;
end;
end;
end;
end.