Автоматизация заказа блюд в ресторане
Курсовой проект - Компьютеры, программирование
Другие курсовые по предмету Компьютеры, программирование
MenuForm.Query1.Close;
MenuForm.Query1.Open;
MenuForm.QuickRep1.Preview;
end;
{Print}8:begin
memo1.Text:=Печать меню;
MenuForm.Query1.Close;
MenuForm.Query1.Open;
MenuForm.QuickRep1.Print;
end;
{Zakaz} 9:FRepZakaz.QuickRep1.Preview;
10: begin
memo1.Text:=Настройка шрифта меню;
FontDialog1.Font := MainForm.Font;
if FontDialog1.Execute then TreeView1.font:=FontDialog1.Font
end;
end;
end;
procedure TMainForm.FormActivate(Sender: TObject);
begin
T_EI.open;
T_Prodinrec.open;
T_products.open;
T_spisokB.open;
T_zakaz.open;
T_typeB.open;
end;
procedure TMainForm.T_zakazCalcFields(DataSet: TDataSet);
begin
T_zakazCalc_stoim.AsCurrency:=T_zakazKol_voZ.AsCurrency + T_zakazLU_CEnaB.AsCurrency
end;
end.
unit RepMenu;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, QuickRpt, QRCtrls, ExtCtrls, DB, DBTables;
type
TMenuForm = class(TForm)
QuickRep1: TQuickRep;
QRBand1: TQRBand;
QRLabel1: TQRLabel;
Query1: TQuery;
DataSource1: TDataSource;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
QRBand2: TQRBand;
QRDBText3: TQRDBText;
QRDBText4: TQRDBText;
QRDBText5: TQRDBText;
QRDBText6: TQRDBText;
QRBand3: TQRBand;
QRExpr1: TQRExpr;
QRDBText7: TQRDBText;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRExpr2: TQRExpr;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRLabel7: TQRLabel;
QRShape5: TQRShape;
QRShape1: TQRShape;
QRShape6: TQRShape;
private
{ Private declarations }
public
{ Public declarations }
end;
var
MenuForm: TMenuForm;
implementation
{$R *.dfm}
end.
unit RepZakaz;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QuickRpt, QRCtrls, ExtCtrls;
type
TFRepZakaz = class(TForm)
QuickRep1: TQuickRep;
QRBand1: TQRBand;
QRBand2: TQRBand;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
QRLabel1: TQRLabel;
QRBand3: TQRBand;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRShape1: TQRShape;
private
{ Private declarations }
public
{ Public declarations }
end;
var
FRepZakaz: TFRepZakaz;
implementation
uses Main;
{$R *.dfm}
end.
unit ZakazUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, Buttons, Mask;
type
TZakazForm = class(TForm)
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
BitBtn1: TBitBtn;
Clear: TBitBtn;
Panel1: TPanel;
Preview: TBitBtn;
Print: TBitBtn;
Memo1: TMemo;
MaskEdit1: TEdit;
procedure ClearClick(Sender: TObject);
procedure PreviewClick(Sender: TObject);
procedure PrintClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ZakazForm: TZakazForm;
implementation
uses Main, RepZakaz;
{$R *.dfm}
procedure TZakazForm.ClearClick(Sender: TObject);
begin
MainForm.T_zakaz.close;
MainForm.T_zakaz.EmptyTable;
MainForm.T_zakaz.Open;
end;
procedure TZakazForm.PreviewClick(Sender: TObject);
begin
FRepZakaz.QuickRep1.Preview;
end;
procedure TZakazForm.PrintClick(Sender: TObject);
begin
FRepZakaz.QuickRep1.Print;
end;
procedure TZakazForm.FormActivate(Sender: TObject);
begin
if not(MainForm.T_zakaz.Active) then MainForm.T_zakaz.Open;
end;
procedure TZakazForm.BitBtn1Click(Sender: TObject);
begin
ZakazForm.Hide;
end;
end.