Главная страница
Контакты

    Басты бет


Автокөлік кәсіпорындарда жолаушыларды есепке алу ақпараттық жүйесі

жүктеу 342.67 Kb.



жүктеу 342.67 Kb.
бет3/3
Дата22.03.2017
өлшемі342.67 Kb.

Автокөлік кәсіпорындарда жолаушыларды есепке алу ақпараттық жүйесі


1   2   3

result:=R.OpenKey(SubKey,false);

if not result then

exit;

Font.name:=R.ReadString('Font Name');



Font.Color:=R.ReadInteger('Color');

Font.Charset:=R.ReadInteger('CharSet');

Font.Size:=R.ReadInteger('Size');

FontStyleInt:=R.ReadInteger('Style');

Move(FontStyleInt,FS,1);

Font.Style:=FS;

finally

R.Free;


end;

end;


procedure TForm1.FormCreate(Sender: TObject);

var t:longint;

begin

t:=GetTickCount div 1000;



while (GetTickCount div 1000)

end;


procedure TForm1.N3Click(Sender: TObject);

begin


Form4.show;

Form4.Button2.visible:=false;

Form4.Button3.Visible:=false;

end;


procedure TForm1.N6Click(Sender: TObject);

begin


close;

end;


procedure TForm1.N4Click(Sender: TObject);

var


XLApp,Sheet,Colum:Variant;

index,i:Integer;

begin

XLApp:=CreateOleObject('Excel.Application');



XLApp.Visible:=true;

XLApp.Workbooks.Add(-4167);

XLApp.Workbooks[1].WorkSheets[1].Name:='Сатылган билеттер';

Colum:=XLApp.Workbooks[1].WorkSheets['Сатылган билеттер'].Columns;

Colum.Columns[1].ColumnWidth:=3;

Colum.Columns[2].ColumnWidth:=35;

Colum.Columns[3].ColumnWidth:=12;

Colum.Columns[4].ColumnWidth:=10;

Colum.Columns[5].ColumnWidth:=12;

Colum.Columns[6].ColumnWidth:=10;

Colum.Columns[7].ColumnWidth:=25;

Colum.Columns[8].ColumnWidth:=25;

Colum.Columns[9].ColumnWidth:=10;

Colum.Columns[10].ColumnWidth:=15;

Colum.Columns[11].ColumnWidth:=10;

Colum.Columns[12].ColumnWidth:=10;

Colum.Columns[13].ColumnWidth:=10;

Colum.Columns[14].ColumnWidth:=10;

Colum.Columns[15].ColumnWidth:=15;

Colum.Columns[15].ColumnWidth:=25;


Colum:=XLApp.Workbooks[1].WorkSheets['Сатылган билеттер'].Rows;

Colum.Rows[2].Font.Bold:=true;

Colum.Rows[1].Font.Bold:=true;

Colum.Rows[1].Font.Color:=clSkyBlue;

Colum.Rows[1].Font.Size:=14;

Sheet:=XLApp.Workbooks[1].WorkSheets['Сатылган билеттер'];

Sheet.Cells[1,2]:='Сатылган билеттер';

Sheet.Cells[2,1]:='№';

Sheet.Cells[2,2]:='Аты-жонi';

Sheet.Cells[2,3]:='Куэлік №';

Sheet.Cells[2,4]:='Автотранспорт №';

Sheet.Cells[2,5]:='Орын №';

Sheet.Cells[2,6]:='Отыргызу аялдамасы';

Sheet.Cells[2,7]:='Тусу аялдамасы';

Sheet.Cells[2,8]:='Багасы';

index:=3;

DataModule3.ADOTable1.First;

for i:=0 to DataModule3.ADOTable1.RecordCount-1 do

begin

Sheet.Cells[index,1]:=DataModule3.ADOTable1.Fields.Fields[0].AsString;



Sheet.Cells[index,2]:=DataModule3.ADOTable1.Fields.Fields[1].AsString;

Sheet.Cells[index,3]:=DataModule3.ADOTable1.Fields.Fields[2].AsString;

Sheet.Cells[index,4]:=DataModule3.ADOTable1.Fields.Fields[3].AsString;

Sheet.Cells[index,5]:=DataModule3.ADOTable1.Fields.Fields[4].AsString;

Sheet.Cells[index,6]:=DataModule3.ADOTable1.Fields.Fields[5].AsString;

Sheet.Cells[index,7]:=DataModule3.ADOTable1.Fields.Fields[6].AsString;

Sheet.Cells[index,8]:=DataModule3.ADOTable1.Fields.Fields[7].AsString;

Inc(index);

DataModule3.ADOTable1.Next;

end;


end;

procedure TForm1.N8Click(Sender: TObject);

begin

DataModule3.ADOTable1.Insert;



Form4.ShowModal;

Form4.Button2.visible:=true;

Form4.Button3.Visible:=true;

end;


procedure TForm1.N9Click(Sender: TObject);

begin


Form4.Show;

Form4.Button2.visible:=true;

Form4.Button3.Visible:=true;

end;


procedure TForm1.N10Click(Sender: TObject);

begin


if MessageDlg('Жазбаны ошiрейн бе?',

mtConfirmation, [mbYes, mbNo], 0)=mrYes then begin DataModule3.ADOTable1.Delete;

end;

end;


procedure TForm1.N11Click(Sender: TObject);

begin


if DataModule3.ADOTable1.Modified then

DataModule3.ADOTable1.Post;

end;

procedure TForm1.N13Click(Sender: TObject);



begin

ColorDialog1.Color := DBGrid1.Color;

if ColorDialog1.Execute then

DBGrid1.Color:=(ColorDialog1.Color);

end;

procedure TForm1.N14Click(Sender: TObject);



begin

if FontDialog1.Execute then

SaveFontToRegistry(FontDialog1.Font, 'Delphi Kingdom\Fonts');

NFont:=TFont.Create;

if ReadFontFromRegistry(NFont,'Delphi Kingdom\Fonts') then

begin


DBGrid1.Font.Assign(NFont);

NFont.Free;

end;

end;


procedure TForm1.N19Click(Sender: TObject);

begin


DataModule3.ADOTable1.IndexFieldNames:='N_bileta';

end;


procedure TForm1.N20Click(Sender: TObject);

begin


DataModule3.ADOTable1.IndexFieldNames:='FIO';

end;


procedure TForm1.N21Click(Sender: TObject);

begin


DataModule3.ADOTable1.IndexFieldNames:='N_udl';

end;
procedure TForm1.N16Click(Sender: TObject);

begin

ComboBox1.Items.Clear;



ComboBox1.Items.Add('N_bileta');

ComboBox1.Items.Add('FIO');

ComboBox1.Items.Add('N_udl');

ComboBox1.Items.Add('N_avtotransporta');

ComboBox1.Items.Add('N_mesta');

ComboBox1.Items.Add('St_posadki');

ComboBox1.Items.Add('St_naznach');

ComboBox1.Items.Add('Zena');

ComboBox1.ItemIndex := 0;

DataModule3.Datasource1.Dataset:= Datamodule3.ADOTable1;

ComboBox1Change(nil);

ModalResult := mrOK;

DBGrid1.Top:=72;

//DBGrid1.Height:=594;

Panel1.Visible:=true;

//Panel4.Visible:=true;

Panel2.Visible:=False;

end;


procedure TForm1.ComboBox1Change(Sender: TObject);

begin


SrchFld :=DataModule3.DataSource1.DataSet.FieldByName(ComboBox1.Text);

Edit1.Text := '';

Panel4.Visible:=True;

end;


procedure TForm1.Edit1Change(Sender: TObject);

begin


BitBtn1.Enabled := Edit1.Text <> '';

end;


procedure TForm1.BitBtn1Click(Sender: TObject);

begin


DBGrid1.Height:=561;

Panel3.Visible:=true;

if not DataModule3.Datasource1.Dataset.Locate(Combobox1.Text, Edit1.Text,

[loCaseInsensitive, loPartialKey]) then

MessageDlg('Жазба табылган жок', mtInformation, [mbOK], 0);

end;


procedure TForm1.BitBtn2Click(Sender: TObject);

begin


DBGrid1.Top:=43;

DBGrid1.Height:=614;

Panel1.Visible:=false;

Panel2.Visible:=false;

Panel3.Visible:=false;

Panel4.Visible:=false;

end;

procedure TForm1.N18Click(Sender: TObject);



begin

DBGrid1.Top:=72;

DBGrid1.Height:=585;

Panel2.Visible:=true;

Panel1.Visible:=false;

Panel3.Visible:=false;

Panel4.Visible:=true;

end;


procedure TForm1.BitBtn3Click(Sender: TObject);

begin


DBGrid1.Top:=43;

DBGrid1.Height:=614;

Panel1.Visible:=false;

Panel2.Visible:=false;

Panel4.Visible:=false;

end;


procedure TForm1.Edit2Change(Sender: TObject);

begin


if Edit2.Text<>'' then begin

DataModule3.ADOTable1.Filtered:=true;

DataModule3.ADOTable1.Filter:='N_bileta=''' edit2.Text '''';

end


else

DataModule3.ADOTable1.Filtered:=false;

end;

procedure TForm1.Edit3Change(Sender: TObject);



begin

if Edit3.Text<>'' then begin

DataModule3.ADOTable1.Filtered:=true;

DataModule3.ADOTable1.Filter:='FIO=''' edit3.Text '''';

end

else


DataModule3.ADOTable1.Filtered:=false;

end;


procedure TForm1.Edit4Change(Sender: TObject);

begin


if Edit4.Text<>'' then begin

DataModule3.ADOTable1.Filtered:=true;

DataModule3.ADOTable1.Filter:='N_udl=''' edit4.Text '''';

end


else

DataModule3.ADOTable1.Filtered:=false;

end;

procedure TForm1.Edit5Change(Sender: TObject);



begin

if Edit5.Text<>'' then begin

DataModule3.ADOTable1.Filtered:=true;

DataModule3.ADOTable1.Filter:='N_avtotransporta=''' edit5.Text '''';

end

else


DataModule3.ADOTable1.Filtered:=false;

end;


procedure TForm1.Edit6Change(Sender: TObject);

begin


if Edit6.Text<>'' then begin

DataModule3.ADOTable1.Filtered:=true;

DataModule3.ADOTable1.Filter:='N_mesta=''' edit6.Text '''';

end


else

DataModule3.ADOTable1.Filtered:=false;

end;

procedure TForm1.BitBtn4Click(Sender: TObject);



begin

N8Click(Sender);

end;

procedure TForm1.BitBtn5Click(Sender: TObject);



begin

N9Click(Sender);

end;

procedure TForm1.BitBtn6Click(Sender: TObject);



begin

N11Click(Sender);

end;

procedure TForm1.BitBtn7Click(Sender: TObject);



begin

N10Click(Sender);

end;

procedure TForm1.BitBtn8Click(Sender: TObject);



begin

N4Click(Sender);

end;

procedure TForm1.BitBtn9Click(Sender: TObject);



begin

N16Click(Sender);

end;

procedure TForm1.BitBtn10Click(Sender: TObject);



begin

N13Click(Sender);

end;

procedure TForm1.BitBtn11Click(Sender: TObject);



begin

N14Click(Sender);

end;

procedure TForm1.BitBtn12Click(Sender: TObject);



begin

N6Click(Sender);

end;

procedure TForm1.BitBtn13Click(Sender: TObject);



begin

N18Click(Sender);

end;

procedure TForm1.N24Click(Sender: TObject);



begin

form5.Show;

end;

procedure TForm1.N23Click(Sender: TObject);



begin

Form7.Show;

end;

procedure TForm1.N25Click(Sender: TObject);



begin

form8.show;

end;

end.
unit Unit3;



interface

uses


SysUtils, Classes, DB, ADODB;

type


TDataModule3 = class(TDataModule)

DataSource1: TDataSource;

ADOTable1: TADOTable;

ADOTable1N_bileta: TAutoIncField;

ADOTable1FIO: TWideStringField;

ADOTable1N_udl: TIntegerField;

ADOTable1N_avtotransporta: TIntegerField;

ADOTable1N_mesta: TIntegerField;

ADOTable1St_posadki: TWideStringField;

ADOTable1St_naznach: TWideStringField;

ADOTable1Zena: TBCDField;

ADOTable2: TADOTable;

ADOTable2N_bileta: TIntegerField;

ADOTable2Day_otpr_avto: TDateTimeField;

ADOTable2Day_otpr_pas: TDateTimeField;

ADOTable2Vr_otpr_pas: TWideStringField;

ADOTable2Vr_sled_pas: TWideStringField;

ADOTable2Vr_prib_pas: TDateTimeField;

ADOTable2day_prib_pas: TDateTimeField;

private


{ Private declarations }

public


{ Public declarations }

end;


var

DataModule3: TDataModule3;

implementation

{$R *.dfm}

end.

unit Unit5;



interface

uses


Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls,ShellApi;

type

TForm5 = class(TForm)



Button1: TButton;

Label1: TLabel;

procedure Button1Click(Sender: TObject);

private


{ Private declarations }

public


{ Public declarations }

end;


var

Form5: TForm5;

implementation

uses Unit4;

{$R *.dfm}

procedure TForm5.Button1Click(Sender: TObject);

begin

ShellExecute(Form5.Handle,Nil,'MailTo:autor@mail.ru',Nil,Nil, SW_SHOWNORMAL);



end;

end.


unit Unit6;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,



Dialogs, StdCtrls, jpeg, ExtCtrls;

type


TForm6 = class(TForm)

Edit1: TEdit;

Button1: TButton;

Button2: TButton;

Label1: TLabel;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private


{ Private declarations }

public


{ Public declarations }

end;


var

Form6: TForm6;

implementation

uses Unit1;

{$R *.dfm}
procedure TForm6.Button1Click(Sender: TObject);

const h='admin';

Var str1:string;

begin


str1:=edit1.Text;

if str1=h then form1.show else MessageDlg('Пароль кате', mtError, [mbYes],0);

form6.Hide;

end;


procedure TForm6.Button2Click(Sender: TObject);

begin


Close;

end;


end.

1   2   3


жүктеу 342.67 Kb.