Автор работы: Пользователь скрыл имя, 27 Мая 2013 в 22:25, курсовая работа
Задача «Абонент АТС» предназначена для автоматизации работы с информацией о поступивших и проданных товарах в магазин.
Задача выполняет основные функции:
ведение базы данных (редактирование данных о товарах);
формирование и выдача на терминал запросов ( об остатке товара на сладе, запросы по поставщикам и клиентам);
формирование и выдача на терминал, а также на печать отчетов (приходная накладная, расходная накладная).
1. Постановка задачи 4
1.1 Характеристика задачи 4
1.2 Выходная информация 5
1.3 Входная информация 13
2. Описание алгоритма решения задачи 14
2.1 Назначение и характеристика 14
2.2 Используемая информация 14
2.3 Результаты решения 14
2.4 Алгоритм решения задачи 15
3. Руководство пользователя 17
3.1 Введение 17
3.2 Назначение и условия применения 17
3.3 Описание операций 17
3.4 Действия при аварийных ситуаци-ях……………………………………...18
4. Руководство системного программиста 19
4.1 Минимальные системные требования 19
4.2 Структура программы 19
4.3 Настройка программы 21
4.4 Проверка программы 21
4.5 Сообщения системному программисту 21
5. Приложение 22
5.1 Листинг программы 22
5.2 Результаты работы программы 39
5.3 Контрольный пример 46
6. Список используемой литерату-ры
begin
unit6.Form6.DBGrid1.
end;
procedure TDataModule1.
begin
unit7.Form7.DBGrid1.
end;
procedure TDataModule1.
begin
unit8.Form8.DBGrid1.
end;
procedure TDataModule1.
begin
unit9.Form9.DBGrid1.
end;
procedure TDataModule1.
begin
unit10.Form10.DBGrid1.
end;
end.
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, jpeg, Menus,
Buttons;
type
TForm4 = class(TForm)
DBGrid1: TDBGrid;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Image1: TImage;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
uses Unit1, Unit2, Unit3,unit12,unit19,unit25;
{$R *.dfm}
procedure TForm4.Button1Click(Sender: TObject);
begin
unit3.DataModule1.adotableatc.
unit12.form12.showmodal;
unit3.DataModule1.adotableatc.
unit3.DataModule1.adotableatc.
end;
procedure TForm4.Button2Click(Sender: TObject);
begin
unit12.form12.showmodal;
unit3.DataModule1.adotableatc.
unit3.DataModule1.adotableatc.
end;
procedure TForm4.Button3Click(Sender: TObject);
begin
if application.MessageBox(pchar('
end;
procedure TForm4.Button4Click(Sender: TObject);
begin
form4.Close;
end;
procedure TForm4.N1Click(Sender: TObject);
begin
unit19.Form19.tag:=2;
unit19.Form19.ShowModal;
end;
procedure TForm4.BitBtn1Click(Sender: TObject);
begin
unit25.form25.Tag:=2;
unit25.form25.showmodal;
end;
procedure TForm4.BitBtn2Click(Sender: TObject);
begin
dbgrid1.DataSource:=unit3.
end;
end.
unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, jpeg, Menus,
Buttons;
type
TForm5 = class(TForm)
DBGrid1: TDBGrid;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Image1: TImage;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form5: TForm5;
implementation
uses Unit1, Unit2, Unit3, Unit4,unit13,unit19,unit25;
{$R *.dfm}
procedure TForm5.Button1Click(Sender: TObject);
begin
unit3.DataModule1.adotablelg.
unit13.form13.showmodal;
unit3.DataModule1.adotablelg.
unit3.DataModule1.adotablelg.
end;
procedure TForm5.Button2Click(Sender: TObject);
begin
unit13.form13.showmodal;
unit3.DataModule1.adotablelg.
unit3.DataModule1.adotablelg.
end;
procedure TForm5.Button3Click(Sender: TObject);
begin
if application.MessageBox(pchar('
end;
procedure TForm5.Button4Click(Sender: TObject);
begin
form5.Close;
end;
procedure TForm5.N1Click(Sender: TObject);
begin
unit19.Form19.tag:=3;
unit19.Form19.ShowModal;
end;
procedure TForm5.BitBtn1Click(Sender: TObject);
begin
unit25.form25.Tag:=3;
unit25.form25.showmodal;
end;
procedure TForm5.BitBtn2Click(Sender: TObject);
begin
dbgrid1.DataSource:=unit3.
end;
end.
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, jpeg, Menus,
Buttons;
type
TForm6 = class(TForm)
DBGrid1: TDBGrid;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Image1: TImage;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form6: TForm6;
implementation
uses Unit1, Unit2, Unit3, Unit4, Unit5, unit14,unit19,unit25;
{$R *.dfm}
procedure TForm6.Button1Click(Sender: TObject);
begin
unit3.DataModule1.adotablesot.
unit14.form14.showmodal;
unit3.DataModule1.adotablesot.
unit3.DataModule1.adotablesot.
end;
procedure TForm6.Button2Click(Sender: TObject);
begin
unit14.form14.showmodal;
unit3.DataModule1.adotablesot.
unit3.DataModule1.adotablesot.
end;
procedure TForm6.Button3Click(Sender: TObject);
begin
if application.MessageBox(pchar('
end;
procedure TForm6.Button4Click(Sender: TObject);
begin
form6.Close;
end;
procedure TForm6.N1Click(Sender: TObject);
begin
unit19.Form19.tag:=4;
unit19.Form19.ShowModal;
end;
procedure TForm6.BitBtn1Click(Sender: TObject);
begin
unit25.form25.Tag:=4;
unit25.form25.showmodal;
end;
procedure TForm6.BitBtn2Click(Sender: TObject);
begin
dbgrid1.DataSource:=unit3.
end;
end.
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, jpeg, Menus,
Buttons;
type
TForm7 = class(TForm)
DBGrid1: TDBGrid;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Image1: TImage;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form7: TForm7;
implementation
uses Unit1, Unit2, Unit3, Unit4, Unit5, Unit6,unit15,unit19,unit25;
{$R *.dfm}
procedure TForm7.Button1Click(Sender: TObject);
begin
unit3.DataModule1.adotabletar.
unit15.form15.showmodal;
unit3.DataModule1.adotabletar.
unit3.DataModule1.adotabletar.
end;
procedure TForm7.Button2Click(Sender: TObject);
begin
unit15.form15.showmodal;
unit3.DataModule1.adotabletar.
unit3.DataModule1.adotabletar.
end;
procedure TForm7.Button3Click(Sender: TObject);
begin
if application.MessageBox(pchar('
end;
procedure TForm7.Button4Click(Sender: TObject);
begin
form7.Close;
end;
procedure TForm7.N1Click(Sender: TObject);
begin
unit19.Form19.tag:=5;
unit19.Form19.ShowModal;
end;
procedure TForm7.BitBtn1Click(Sender: TObject);
begin
unit25.form25.Tag:=5;
unit25.form25.showmodal;
end;
procedure TForm7.BitBtn2Click(Sender: TObject);
begin
dbgrid1.DataSource:=unit3.
end;
end.
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, Buttons, jpeg,
Menus;
type
TForm8 = class(TForm)
DBGrid1: TDBGrid;
Label1: TLabel;
Label2: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
Image1: TImage;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure N1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form8: TForm8;
implementation
uses Unit1, Unit2, Unit3, Unit4, Unit5, Unit6, Unit7,unit16,unit19;
{$R *.dfm}
procedure TForm8.BitBtn1Click(Sender: TObject);
begin
unit3.DataModule1.adotableza.
unit16.form16.showmodal;
unit3.DataModule1.adotableza.
unit3.DataModule1.adotableza.
end;
procedure TForm8.BitBtn2Click(Sender: TObject);
begin
unit16.form16.showmodal;
unit3.DataModule1.adotableza.
unit3.DataModule1.adotableza.
end;
procedure TForm8.BitBtn3Click(Sender: TObject);
begin
if application.MessageBox(pchar('
end;
procedure TForm8.BitBtn4Click(Sender: TObject);
begin
form8.Close;
end;
procedure TForm8.N1Click(Sender: TObject);
begin
unit19.Form19.tag:=6;
unit19.Form19.ShowModal;
end;
end.
unit Unit9;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, StdCtrls, Buttons, jpeg, ExtCtrls, Menus;
type
TForm9 = class(TForm)
Label1: TLabel;
Label2: TLabel;
DBGrid1: TDBGrid;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
Image1: TImage;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure N1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form9: TForm9;
implementation
uses unit1,unit3,unit17,unit19;
{$R *.dfm}
procedure TForm9.BitBtn1Click(Sender: TObject);
begin
unit3.DataModule1.adotablepl.
unit17.form17.showmodal;
unit3.DataModule1.adotablepl.
unit3.DataModule1.adotablepl.
end;
procedure TForm9.BitBtn2Click(Sender: TObject);
begin
unit17.form17.showmodal;
unit3.DataModule1.adotablepl.
unit3.DataModule1.adotablepl.
end;
procedure TForm9.BitBtn3Click(Sender: TObject);
begin
if application.MessageBox(pchar('
end;
procedure TForm9.BitBtn4Click(Sender: TObject);
begin
form9.Close;
end;
procedure TForm9.N1Click(Sender: TObject);
begin
unit19.Form19.tag:=7;
unit19.Form19.ShowModal;
end;
end.
unit Unit10;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, DBGrids, jpeg, ExtCtrls, Buttons, Menus;
type
TForm10 = class(TForm)
DBGrid1: TDBGrid;
Label1: TLabel;
Label2: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
Image1: TImage;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure N1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form10: TForm10;
implementation
uses unit1,unit3,unit18,unit19;
{$R *.dfm}
procedure TForm10.BitBtn1Click(Sender: TObject);
begin
unit3.DataModule1.adotabletel.
unit18.form18.showmodal;
unit3.DataModule1.adotabletel.
unit3.DataModule1.adotabletel.
end;
procedure TForm10.BitBtn2Click(Sender: TObject);
begin
unit18.form18.showmodal;
unit3.DataModule1.adotabletel.
unit3.DataModule1.adotabletel.
end;
procedure TForm10.BitBtn3Click(Sender: TObject);
begin
if application.MessageBox(pchar('
end;
procedure TForm10.BitBtn4Click(Sender: TObject);
begin
form10.Close;
end;
procedure TForm10.N1Click(Sender: TObject);
begin
unit19.Form19.tag:=8;
unit19.Form19.ShowModal;
end;
end.
unit Unit11;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DBCtrls, Mask, ComCtrls, jpeg, ExtCtrls;
type
TForm11 = class(TForm)
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
DBEdit2: TDBEdit;
DBEdit4: TDBEdit;
DBComboBox1: TDBComboBox;
Button1: TButton;
Button2: TButton;
MonthCalendar1: TMonthCalendar;
Image1: TImage;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
procedure UpDown1Click(Sender: TObject; Button: TUDBtnType);
procedure MonthCalendar1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form11: TForm11;
implementation
uses unit2,unit3;
{$R *.dfm}
procedure TForm11.Button1Click(Sender: TObject);
begin
if Unit3.datamodule1.adotableab.
Unit3.datamodule1.adotableab.
unit3.DataModule1.adotableab.
unit3.DataModule1.adotableab.
Close;
end;
procedure TForm11.Button2Click(Sender: TObject);
begin
form11.Close;
end;
procedure TForm11.DBEdit1KeyPress(
begin
if (key <> #8) then
begin
case Key of
'0'..'9': key := key;
else
Key := #0;
end;
end;
end;
procedure TForm11.DBEdit2KeyPress(
begin
if (key <> #8) and (key<>' ') then
begin
case Key of
'а'..'я','А'..'Я': key := key;
else
Key := #0;
end;
end;
end;
procedure TForm11.UpDown1Click(Sender: TObject; Button: TUDBtnType);
begin
{case Button of
btNext: monthcalendar1. NextYear;
btPrev: monthcalendar1. PrevYear;
end;
maskedit1. SetFocus;}
end;
procedure TForm11.MonthCalendar1Click(
begin
dbedit4.Text:=datetostr(
end;
end.
unit Unit12;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, jpeg, ExtCtrls;
type
TForm12 = class(TForm)
Label2: TLabel;
Label3: TLabel;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
Button1: TButton;
Button2: TButton;
Image1: TImage;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);