Файл: Проектирование реализации операций бизнес-процесса «Движение библиотечного фонда».pdf

ВУЗ: Не указан

Категория: Курсовая работа

Дисциплина: Не указана

Добавлен: 28.03.2023

Просмотров: 79

Скачиваний: 2

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

Edit2: TEdit;

Button1: TButton;

Button2: TButton;

ADOTable1: TADOTable;

ADOConnection1: TADOConnection;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form8: TForm8;

implementation

uses main;

{$R *.dfm}

procedure TForm8.Button1Click(Sender: TObject);

var log,par: string;

begin

ADOTable1.Open;

log:= Edit1.Text;

par:= Edit2.Text;

if (ADOTable1.FieldValues['login']=log) and (ADOTable1.FieldValues['password']=par)then

begin

Form8.Hide;

Form1.Show;

end

else ShowMessage('Логин и пароль введены не верно')

end;

procedure TForm8.Button2Click(Sender: TObject);

begin

close;

end;

end.

unit main;

interface

uses

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

Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, DB, ADODB, Menus, StdCtrls;

type

TForm1 = class(TForm)

ADOConnection1: TADOConnection;

DataSource1: TDataSource;

DBGrid1: TDBGrid;

MainMenu1: TMainMenu;

N1: TMenuItem;

N3: TMenuItem;

N4: TMenuItem;

N5: TMenuItem;

N6: TMenuItem;

N7: TMenuItem;

N8: TMenuItem;

N9: TMenuItem;

N10: TMenuItem;

N11: TMenuItem;

DBNavigator1: TDBNavigator;

ADOTable1: TADOTable;

ADOTable2: TADOTable;

ADOTable3: TADOTable;

DataSource2: TDataSource;

DataSource3: TDataSource;

ADOTable4: TADOTable;

DataSource4: TDataSource;

ADOTable1id: TAutoIncField;

ADOTable1givedate: TDateField;

ADOTable1returndate: TDateField;

ADOTable1comment: TMemoField;

ADOTable1bookid: TIntegerField;

ADOTable1readerid: TIntegerField;

ADOTable1userid: TIntegerField;

ADOTable1book: TStringField;

ADOTable1reader: TStringField;

ADOTable1user: TStringField;

procedure N4Click(Sender: TObject);

procedure N7Click(Sender: TObject);

procedure N11Click(Sender: TObject);

procedure N8Click(Sender: TObject);

procedure N10Click(Sender: TObject);

procedure N9Click(Sender: TObject);

procedure N2Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure N5Click(Sender: TObject);

procedure N6Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

uses users, tip, reader, avtor, book, vidvoz, vcod, rep1;

{$R *.dfm}

procedure TForm1.N4Click(Sender: TObject);

begin

Form8.Close;

Close;

end;

procedure TForm1.N7Click(Sender: TObject);

begin

Form2.show;

end;

procedure TForm1.N11Click(Sender: TObject);

begin

Form3.show;

end;

procedure TForm1.N8Click(Sender: TObject);

begin

Form4.show;

end;

procedure TForm1.N10Click(Sender: TObject);

begin

Form5.show;

end;

procedure TForm1.N9Click(Sender: TObject);

begin

Form6.show;

end;

procedure TForm1.N2Click(Sender: TObject);

begin

Form7.show;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

Form7.Show;

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

Form7.Show;

end;

procedure TForm1.N5Click(Sender: TObject);

begin

Form9.QuickRep1.Preview;

end;

procedure TForm1.N6Click(Sender: TObject);

begin

Form7.show;

end;

end.

unit users;

interface

uses

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

Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, DB, ADODB;

type

TForm2 = class(TForm)

ADOTable1: TADOTable;

DBGrid1: TDBGrid;

DataSource1: TDataSource;

DBNavigator1: TDBNavigator;

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form2: TForm2;


implementation

uses main;

{$R *.dfm}

end.

unit tip;

interface

uses

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

Dialogs, DB, ADODB, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls;

type

TForm3 = class(TForm)

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

ADOTable1: TADOTable;

DataSource1: TDataSource;

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form3: TForm3;

implementation

uses main;

{$R *.dfm}

end.

unit reader;

interface

uses

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

Dialogs, DB, ExtCtrls, DBCtrls, Grids, DBGrids, ADODB, StdCtrls;

type

TForm4 = class(TForm)

ADOTable1: TADOTable;

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

DataSource1: TDataSource;

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form4: TForm4;

implementation

uses main;

{$R *.dfm}

end.

unit avtor;

interface

uses

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

Dialogs, StdCtrls, DB, ADODB, ExtCtrls, DBCtrls, Grids, DBGrids;

type

TForm5 = class(TForm)

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

DataSource1: TDataSource;

ADOTable1: TADOTable;

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form5: TForm5;

implementation

uses main;

{$R *.dfm}

end.

unit book;

interface

uses

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

Dialogs, StdCtrls, DB, ADODB, Grids, DBGrids, DBCtrls, Mask, ExtCtrls;

type

TForm6 = class(TForm)

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

ADOTable1: TADOTable;

ADOTable2: TADOTable;

DataSource1: TDataSource;

DataSource2: TDataSource;

ADOTable3: TADOTable;

DataSource3: TDataSource;

ADOTable1id: TAutoIncField;

ADOTable1caption: TStringField;

ADOTable1description: TMemoField;

ADOTable1categoryid: TIntegerField;

ADOTable1IBSN: TStringField;

ADOTable1authorid: TIntegerField;

ADOTable1category: TStringField;

ADOTable1autyor: TStringField;

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form6: TForm6;

implementation

uses main;

{$R *.dfm}

end.

unit vidvoz;

interface

uses

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

Dialogs, StdCtrls, DB, Grids, DBGrids, ADODB, ExtCtrls, DBCtrls, Mask,

QuickRpt, QRCtrls, ComCtrls;

type

TForm7 = class(TForm)

Label1: TLabel;

Button1: TButton;

DateTimePicker1: TDateTimePicker;

DateTimePicker2: TDateTimePicker;

Label2: TLabel;

Label3: TLabel;

procedure Button1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form7: TForm7;

adata1,adata2: String;

implementation

uses main, rep2;

{$R *.dfm}

procedure TForm7.Button1Click(Sender: TObject);

begin

adata1:=FormatDateTime('yyyy.mm.dd',DateTimePicker1.Date);

adata2:=FormatDateTime('yyyy.mm.dd',DateTimePicker2.Date);

Form10.ADOQuery1.Active:=false;

Form10.ADOQuery1.SQL.Clear;

Form10.ADOQuery1.SQL.add('SELECT count(*) FROM motion where givedate>="'+adata1+'" and givedate<="'+adata2+'"');

Form10.ADOQuery2.Active:=false;

Form10.ADOQuery2.SQL.Clear;

Form10.ADOQuery2.SQL.add('SELECT count(*) FROM motion where givedate>="'+adata1+'" and givedate<="'+adata2+'" and motion.returndate is not null');

Form10.ADOQuery3.Active:=false;

Form10.ADOQuery3.SQL.Clear;

Form10.ADOQuery3.SQL.add('SELECT count(*) FROM motion where givedate>="'+adata1+'" and givedate<="'+adata2+'" and motion.returndate is null');

Form10.ADOQuery1.Active:=true;

Form10.ADOQuery2.Active:=true;

Form10.ADOQuery3.Active:=true;