Автор работы: Пользователь скрыл имя, 07 Января 2010 в 18:12, Не определен
Введение
1. Структура и функции учреждения
2. Постановка задачи
3. Техническое задание.
4. Описание входной и выходной информации
5. Экспериментальный раздел
6. Приложение.
6.1.Исходный текст программы
6.2.Результаты контрольного примера
begin
f3.SG1.Cells[4,i]:=DM6.T3.
f3.SG1.Cells[5,i]:=DM6.T3.
inc(i);
f3.SG1.RowCount:=f3.SG1.
DM6.T3.Delete;
end
else
DM6.T3.Next;
end;
DM6.T2.Delete;
end
else
DM6.T2.Next;
end;
if kol<>0 then
begin
if DM6.T2.FieldByName('Треб. кол').AsInteger>0 then
begin
f3.SG1.Cells[0,i]:=DM6.
f3.SG1.Cells[1,i]:=DM6.
f3.SG1.Cells[2,i]:=DM6.
f3.SG1.Cells[3,i]:=DM6.
f3.SG1.Cells[4,i]:=DM6.
inc(i);
f3.SG1.RowCount:=f3.SG1.
end;
DM6.T2.Next;
end;
end;
end;
procedure TForm1.clearf2;
begin
f2.Edit1.Clear;
f2.Edit2.Clear;
f2.Edit3.Clear;
f2.Edit4.Clear;
f2.Edit5.Clear;
f2.Edit4.SetFocus;
end;
procedure clearf3;
begin
for w:=0 to f3.SG1.Rowcount do
for i:=0 to f3.SG1.ColCount do
f3.SG1.Cells[w,i]:=' ';
end;
procedure TForm1.N12Click(Sender: TObject);
begin
f2.ComboBox1.Visible:=
f2.Edit1.Visible:=true;
f2.Edit2.Visible:=true;
f2.Edit3.Visible:=true;
f2.Edit4.Visible:=true;
f2.Edit5.Visible:=true;
f2.Label1.Visible:=true;
f2.Label2.Visible:=true;
f2.Label3.Visible:=true;
f2.Label4.Visible:=true;
f2.Label5.Visible:=true;
f2.Button1.Caption:='
f2.Label3.Caption:='
f2.Label4.Caption:='
f2.Caption:='Получение книг';
f2.Width:=652;
f2.Height:=135;
f2.Button1.Top:=40;
f2.Button2.Top:=70;
f2.Show;
clearf2;
kn:=2;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
f5.Visible:=false;
f4.Visible:=false;
if unit5.user then N6.Enabled:=false;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
StatusBar1.Panels[0].
end;
procedure TForm1.N25Click(Sender: TObject);
begin
i:=1;
if MessageBox(0,'Отправить
заявку в издательство','Информация',mb_
begin
f3.sg1.Cells[0,0]:='
f3.SG1.Cells[1,0]:='
f3.SG1.Cells[2,0]:='
DM6.T2.RecNo:=1;
f3.Caption:='Список требуемых книг';
f3.SG1.ColCount:=3;
f3.SG1.RowCount:=2;
while not(DM6.T2.Eof) do
begin
if DM6.T2.FieldByName('Треб. кол').Asinteger>0 then
f3.SG1.Cells[0,i]:=DM6.
f3.SG1.Cells[1,i]:=DM6.
f3.SG1.Cells[2,i]:=DM6.
inc(i);
f3.SG1.RowCount:=f3.SG1.
DM6.T2.Next;
end;end;
f3.SG1.RowCount:=f3.SG1.
F3.Show;
end;
procedure TForm1.N9Click(Sender: TObject);
begin
f4.show;
f4.Caption:='Изменить пароль';
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
DBGrid1.Columns[0].Width:
DBGrid2.Columns[0].Width:
DBGrid3.Columns[0].Width:
end;
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if MessageBox(0,'Вам что выйти захотелось? (Да/Нет)','Выход',mb_YesNo)=6 then
begin
application.Destroying;
f5.Close;
f4.close;
end;end;
procedure TForm1.N11Click(Sender: TObject);
begin
f2.Caption:='Удаление записей';
f2.Button1.Caption:='
f2.Show;
kn:=3;
f2.ComboBox1.ItemIndex:=-
f2.ComboBox1.Visible:=
f2.ComboBox1.Text:='';
f2.Button1.Top:=80;
f2.Button2.Top:=110;
f2.Label1.Visible:=false;
f2.Label2.Visible:=false;
f2.Label3.Visible:=false;
f2.Label5.Visible:=false;
f2.Label6.Visible:=true;
f2.Edit1.Visible:=false;
f2.Edit2.Visible:=false;
f2.Edit3.Visible:=false;
f2.Edit5.Visible:=false;
f2.Label4.Caption:='Номер ID записи или номер заказа';
f2.Height:=175;
f2.Width:=225;
clearf2;
end;
procedure TForm1.N18Click(Sender: TObject);
begin
f3.Show;
f3.Caption:='Ведомость для удовлетворённых заказов';
clearf3;
find(0);
end;
procedure TForm1.N19Click(Sender: TObject);
begin
f3.Show;
f3.Caption:='Ведомость
для неудовлетворённых заказов'
clearf3;
find(1);
end;
procedure TForm1.N17Click(Sender: TObject);
var sum:integer;
begin
f3.Show;
f3.SG1.RowCount:=1;
clearf3;
f3.Caption:='Сводная ведомость';
f3.SG1.Cells[0,0]:='
f3.SG1.Cells[1,0]:='
f3.SG1.Cells[2,0]:='
f3.SG1.Cells[3,0]:='Кол-
f3.SG1.Cells[4,0]:='
f3.SG1.ColCount:=5;
w:=1;
i:=1;
sum:=0;
DM6.T3.RecNo:=1;
while not(DM6.T3.eof) do
begin
f3.SG1.Cells[0,i]:=DM6.
DM6.T2.Locate('№ заказа',DM6.T3.FieldByName('№ заказа').AsInteger,[]);
f3.SG1.Cells[1,i]:=DM6.
f3.SG1.Cells[2,i]:=DM6.
f3.SG1.Cells[3,i]:=DM6.
f3.SG1.Cells[4,i]:=DM6.
sum:=sum+DM6.T3.
inc(i);
f3.SG1.RowCount:=f3.SG1.
DM6.T3.Next;
end;
f3.SG1.RowCount:=f3.SG1.
f3.SG1.Cells[3,i]:='
f3.SG1.Cells[4,i]:=
end;
procedure TForm1.N21Click(Sender: TObject);
begin
f2.Edit5.Visible:=false;
f2.Label5.Visible:=false;
f2.Label1.Visible:=true;
f2.Label2.Visible:=true;
f2.Label3.Visible:=true;
f2.Label6.Visible:=true;
f2.Edit1.Visible:=true;
f2.Edit2.Visible:=true;
f2.Edit3.Visible:=true;
f2.Label4.Caption:='
f2.ComboBox1.Visible:=
f2.Button1.Caption:='
f2.Button1.Top:=40;
f2.Button2.Top:=70;
f2.Caption:='Заявка на книгу';
f2.Width:=525;
f2.Height:=135;
f2.show;
kn:=0;
clearf2;
end;
procedure TForm1.N22Click(Sender: TObject);
begin
f2.Edit5.Visible:=false;
f2.Label5.Visible:=false;
f2.Label1.Visible:=true;
f2.Label2.Visible:=true;
f2.Label3.Visible:=true;
f2.Label6.Visible:=true;
f2.Edit1.Visible:=true;
f2.Edit2.Visible:=true;
f2.Edit3.Visible:=true;
f2.Label4.Caption:='
f2.ComboBox1.Visible:=
f2.Button1.Caption:='
f2.Button1.Top:=40;
f2.Button2.Top:=70;
f2.Caption:='Заявка на дополнительный тираж';
f2.Width:=525;
f2.Height:=135;
f2.Show;
kn:=1;
clearf2;
end;
procedure TForm1.N2Click(Sender: TObject);
begin
if MessageBox(0,'Вам что выйти захотелось? (Да/Нет)','Выход',mb_YesNo)=6 then
begin
application.Destroying;
f5.Close;
f4.close;
close;
end;
end;end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Edit4: TEdit;
Edit5: TEdit;
Label5: TLabel;
ComboBox1: TComboBox;
Label6: TLabel;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Edit3KeyPress(Sender: TObject; var Key: Char);
procedure Edit5KeyPress(Sender: TObject; var Key: Char);
end;
var
F2: TForm2;
implementation
uses Unit1, DB, Unit3, Unit6;
{$R *.dfm}
procedure TForm2.Button2Click(Sender: TObject);
begin
close;
end;
procedure TForm2.Button1Click(Sender: TObject);