Автор работы: Пользователь скрыл имя, 27 Ноября 2014 в 10:34, курсовая работа
Принцип устойчивости заключается в том, что система АРМ должна выполнять основные функции независимо от воздействия на нее внутренних и внешних возможных факторов. Это значит, что неполадки в отдельных ее частях должны быть легко устранимы, а работоспособность системы – быстро восстановима.
Эффективность АРМ следует рассматривать как интегральный показатель уровня реализации приведенных выше принципов, отнесенного к затратам по созданию и эксплуатации системы.
ADOQuery3.Open;
Form8.Label5.Caption:=
Form8.ADOQuery2.SQL.Clear;
st:='SELECT Детализация.Код_детализации,
st:=st+'Детализация.Количество FROM Детализация,Товары WHERE ';
st:=st+'(Журнал='+Form8.
Form8.ADOQuery2.SQL.Add(st);
Form8.ADOQuery2.Open;
Form8.DBGrid1.Columns[0].
//заказчик
Form8.ADOQuery3.SQL.Clear;
Form8.ADOQuery3.SQL.Add('
Form8.ADOQuery3.Open;
Form8.Zak.ListField:='ФИО';
Form8.Zak.KeyField:='Код_
//разносчик
Form8.ADOQuery4.SQL.Clear;
Form8.ADOQuery4.SQL.Add('
Form8.ADOQuery4.Open;
Form8.Razn.ListField:='ФИО';
Form8.Razn.KeyField:='Код_
Form8.ShowModal;
end;
procedure TForm1.DBGrid1CellClick(
var
st:String;
begin
st:='SELECT Товары.Наименование, Детализация.Количество FROM Детализация, Товары ';
st:=st+'WHERE (Товары.Код_товара=
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Add(st);
ADOQuery2.Open;
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids;
type
TForm2 = class(TForm)
DBGrid1: TDBGrid;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
DataSource1: TDataSource;
ADOQuery1: TADOQuery;
procedure Button4Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses Unit1, Unit3;
{$R *.dfm}
procedure TForm2.Button4Click(Sender: TObject);
begin
Form2.Close;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT * FROM Заказчики ORDER BY ФИО');
ADOQuery1.Open;
DBGrid1.Columns[0].Width:=0;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
with Application do
begin
if MessageBox('Вы хотите удалить запись?', 'Удаление', MB_OKCANCEL)=IDOK then
ADOQuery1.Delete;
end;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
Form3.Caption:='Добавление';
Form3.ShowModal;
end;
procedure TForm2.Button3Click(Sender: TObject);
begin
Form3.Caption:='
Form3.Edit1.Text:=ADOQuery1.
Form3.Edit2.Text:=ADOQuery1.
Form3.Edit3.Text:=ADOQuery1.
Form3.ShowModal;
end;
end.
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm3 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
begin
Edit1.Text:='';
Edit2.Text:='';
Edit3.Text:='';
Form3.Close;
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
if Edit1.Text='' then
begin
showmessage('Введите ФИО!');
Edit1.SetFocus;
exit;
end;
if Edit2.Text='' then
begin
showmessage('Введите Адрес!');
Edit2.SetFocus;
exit;
end;
if Edit3.Text='' then
begin
showmessage('Введите телефон!'
Edit3.SetFocus;
exit;
end;
if Form3.Caption='Добавление' then
Form2.ADOQuery1.Insert
else
Form2.ADOQuery1.Edit;
Form2.ADOQuery1.FieldValues['
Form2.ADOQuery1.FieldValues['
Form2.ADOQuery1.FieldValues['
Form2.ADOQuery1.UpdateRecord;
Form2.ADOQuery1.Last;
Form2.ADOQuery1.First;
Button1Click(Sender);
end;
end.
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids;
type
TForm4 = class(TForm)
DBGrid1: TDBGrid;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
DataSource1: TDataSource;
ADOQuery1: TADOQuery;
procedure FormCreate(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
uses Unit1, Unit5;
{$R *.dfm}
procedure TForm4.FormCreate(Sender: TObject);
begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT * FROM Разносчики ORDER BY ФИО');
ADOQuery1.Open;
DBGrid1.Columns[0].Width:=0;
end;
procedure TForm4.Button4Click(Sender: TObject);
begin
Form4.Close;
end;
procedure TForm4.Button2Click(Sender: TObject);
begin
with Application do
begin
if MessageBox('Вы хотите удалить запись?', 'Удаление', MB_OKCANCEL)=IDOK then
ADOQuery1.Delete;
end;
end;
procedure TForm4.Button1Click(Sender: TObject);
begin
Form5.Caption:='Добавление';
Form5.ShowModal;
end;
procedure TForm4.Button3Click(Sender: TObject);
begin
Form5.Caption:='
Form5.Edit1.Text:=ADOQuery1.
Form5.Edit3.Text:=ADOQuery1.
Form5.ShowModal;
end;
end.
unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm5 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label3: TLabel;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form5: TForm5;
implementation
uses Unit4;
{$R *.dfm}
procedure TForm5.Button1Click(Sender: TObject);
begin
Edit1.Text:='';
Edit3.Text:='';
Form5.Close;
end;
procedure TForm5.Button2Click(Sender: TObject);
begin
if Edit1.Text='' then
begin
showmessage('Введите ФИО!');
Edit1.SetFocus;
exit;
end;
if Edit3.Text='' then
begin
showmessage('Введите телефон!'
Edit3.SetFocus;
exit;
end;
if Form5.Caption='Добавление' then
Form4.ADOQuery1.Insert
else
Form4.ADOQuery1.Edit;
Form4.ADOQuery1.FieldValues['
Form4.ADOQuery1.FieldValues['
Form4.ADOQuery1.UpdateRecord;
Form4.ADOQuery1.Last;
Form4.ADOQuery1.First;
Button1Click(Sender);
end;
end.
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids;
type
TForm6 = class(TForm)
DBGrid1: TDBGrid;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
DataSource1: TDataSource;
ADOQuery1: TADOQuery;
procedure Button4Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form6: TForm6;
implementation
uses Unit1, Unit7;
{$R *.dfm}
procedure TForm6.Button4Click(Sender: TObject);
begin
Form6.Close;
end;
procedure TForm6.Button2Click(Sender: TObject);
begin
with Application do
begin
if MessageBox('Вы хотите удалить запись?', 'Удаление', MB_OKCANCEL)=IDOK then
ADOQuery1.Delete;
end;
end;
procedure TForm6.FormCreate(Sender: TObject);
begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT * FROM Товары ORDER BY Наименование');
ADOQuery1.Open;
DBGrid1.Columns[0].Width:=0;
end;
procedure TForm6.Button1Click(Sender: TObject);
begin
Form7.Caption:='Добавление';
Form7.ShowModal;
end;
procedure TForm6.Button3Click(Sender: TObject);
begin
Form7.Caption:='
Form7.Edit1.Text:=ADOQuery1.
Form7.Edit2.Text:=ADOQuery1.
Form7.Edit3.Text:=ADOQuery1.
Form7.ShowModal;
end;
end.
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm7 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form7: TForm7;
implementation
uses Unit6;
{$R *.dfm}
procedure TForm7.Button1Click(Sender: TObject);
begin
Edit1.Text:='';
Edit2.Text:='';
Edit3.Text:='';
Form7.Close;
end;
procedure TForm7.Button2Click(Sender: TObject);
begin
if Edit1.Text='' then
begin
showmessage('Введите
Edit1.SetFocus;
exit;
end;
if Edit2.Text='' then
begin
showmessage('Введите Группу!')
Edit2.SetFocus;
exit;
end;
if Edit3.Text='' then
begin
showmessage('Введите Цену!');
Edit3.SetFocus;
exit;
end;
if Form7.Caption='Добавление' then
Form6.ADOQuery1.Insert
else
Form6.ADOQuery1.Edit;
Form6.ADOQuery1.FieldValues['
Form6.ADOQuery1.FieldValues['
Form6.ADOQuery1.FieldValues['
Form6.ADOQuery1.UpdateRecord;
Form6.ADOQuery1.Last;
Form6.ADOQuery1.First;
Button1Click(Sender);
end;
end.
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DBCtrls, Grids, DBGrids, DB, ADODB, ComCtrls;
type
TForm8 = class(TForm)
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label1: TLabel;
Zak: TDBLookupComboBox;
Label2: TLabel;
Razn: TDBLookupComboBox;
Label3: TLabel;
Label4: TLabel;
Button1: TButton;
Button2: TButton;
DBGrid1: TDBGrid;
DBGrid2: TDBGrid;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
ADOQuery2: TADOQuery;
DataSource2: TDataSource;
ADOQuery3: TADOQuery;
DataSource3: TDataSource;
ADOQuery4: TADOQuery;
DataSource4: TDataSource;
ADOQuery5: TADOQuery;
DataSource5: TDataSource;
Label5: TLabel;
Label6: TLabel;
Dat: TDateTimePicker;
Label7: TLabel;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure DBGrid2DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form8: TForm8;
implementation
uses Unit1, Unit9;
{$R *.dfm}
procedure TForm8.FormCreate(Sender: TObject);
begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT * FROM Товары ORDER BY Наименование');
ADOQuery1.Open;
DBGrid2.Columns[0].Width:=0;
end;
procedure TForm8.Button1Click(Sender: TObject);
begin
Zak.KeyValue:=0;
Razn.KeyValue:=0;
Form8.Close;
end;
procedure TForm8.Button2Click(Sender: TObject);
var
st:String;
begin
ADOQuery5.SQL.Clear;
ADOQuery5.SQL.Add('SELECT * FROM Журнал');
ADOQuery5.Open;
ADOQuery5.Insert;
ADOQuery5.FieldValues['
ADOQuery5.FieldValues['
ADOQuery5.FieldValues['Сумма']
ADOQuery5.FieldValues['Дата']:
ADOQuery5.UpdateRecord;
ADOQuery5.Last;
ADOQuery5.First;
st:='SELECT Журнал.Код_журнала,Заказчики.
st:=st+'FROM Журнал,Заказчики, Разносчики
WHERE (Журнал.Заказчик=Заказчики.
st:=st+'(Журнал.Разносчик=
Form1.ADOQuery1.SQL.Clear;
Form1.ADOQuery1.SQL.Add(st);
Form1.ADOQuery1.Open;
Form1.DBGrid1.Columns[0].
st:='SELECT Товары.Наименование, Детализация.Количество FROM Детализация, Товары ';
st:=st+'WHERE (Товары.Код_товара=
Form1.ADOQuery2.SQL.Clear;
Form1.ADOQuery2.SQL.Add(st);
Form1.ADOQuery2.Open;
Button1Click(Sender);
end;
procedure TForm8.DBGrid2DblClick(Sender: TObject);
begin
Form9.ShowModal;
end;
end.
unit Unit9;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TForm9 = class(TForm)
Edit1: TEdit;
UpDown1: TUpDown;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form9: TForm9;
implementation
uses Unit8;
{$R *.dfm}
procedure TForm9.Button1Click(Sender: TObject);
begin
Edit1.Text:='1';
Form9.Close;
end;
procedure TForm9.Button2Click(Sender: TObject);
var
sum:Integer;
st:String;
begin
Form8.ADOQuery2.SQL.Clear;
Form8.ADOQuery2.SQL.Add('
Form8.ADOQuery2.Open;
Form8.ADOQuery2.Insert;
Form8.ADOQuery2.FieldValues['
Form8.ADOQuery2.FieldValues['
Form8.ADOQuery2.FieldValues['
Form8.ADOQuery2.UpdateRecord;
Form8.ADOQuery2.Last;
Form8.ADOQuery2.First;
Form8.ADOQuery2.SQL.Clear;
st:='SELECT Детализация.Код_детализации,
st:=st+'Детализация.Количество FROM Детализация,Товары WHERE ';
st:=st+'(Журнал='+Form8.
Form8.ADOQuery2.SQL.Add(st);
Form8.ADOQuery2.Open;
Form8.DBGrid1.Columns[0].
sum:=StrToInt(Edit1.Text)*
Form8.Label4.Caption:=
Button1Click(Sender);
end;
end.
Информация о работе Разработка информационной системы для фирмы по обслуживанию клиентов