84
55.
SpeedButton3: TSpeedButton;
56.
SpeedButton4: TSpeedButton;
А қосымшасының жалғасы
57.
SpeedButton5: TSpeedButton;
58.
SpeedButton6: TSpeedButton;
59.
SpeedButton7: TSpeedButton;
60.
SpeedButton8: TSpeedButton;
61.
SpeedButton9: TSpeedButton;
62.
SpeedButton10: TSpeedButton;
63.
SpeedButton11: TSpeedButton;
64.
SpeedButton12: TSpeedButton;
65.
SpeedButton13: TSpeedButton;
66.
SpeedButton14: TSpeedButton;
67.
SpeedButton15: TSpeedButton;
68.
SpeedButton16: TSpeedButton;
69.
SpeedButton17: TSpeedButton;
70.
SpeedButton18: TSpeedButton;
71.
SpeedButton19: TSpeedButton;
72.
SpeedButton20: TSpeedButton;
73.
Image1: TImage;
74.
SpeedButton23: TSpeedButton;
75.
DBEdit1: TDBEdit;
76.
DBEdit2: TDBEdit;
77.
DBEdit3: TDBEdit;
78.
DBEdit4: TDBEdit;
79.
DBEdit5: TDBEdit;
80.
DBEdit6: TDBEdit;
81.
DBEdit7: TDBEdit;
82.
DBEdit9: TDBEdit;
83.
DBEdit10: TDBEdit;
84.
DBEdit11: TDBEdit;
85.
DBEdit12: TDBEdit;
86.
DBEdit13: TDBEdit;
87.
DBEdit14: TDBEdit;
88.
DBEdit15: TDBEdit;
89.
DBEdit16: TDBEdit;
90.
DBEdit17: TDBEdit;
91.
DBEdit18: TDBEdit;
92.
DBEdit19: TDBEdit;
93.
DBComboBox1: TDBComboBox;
94.
DBImage1: TDBImage;
95.
DBImage2: TDBImage;
96.
Button1: TButton;
97.
DBEdit8: TDBEdit;
98.
DBMemo1: TDBMemo;
99.
TabSheet2: TTabSheet;
100.
GroupBox1: TGroupBox;
101.
Image12: TImage;
102.
Image13: TImage;
103.
Image14: TImage;
85
104.
SpeedButton22: TSpeedButton;
105.
Image9: TImage;
А қосымшасының жалғасы
106.
RadioGroup1: TRadioGroup;
107.
RadioGroup2: TRadioGroup;
108.
GroupBox3: TGroupBox;
109.
GroupBox4: TGroupBox;
110.
SpeedButton25: TSpeedButton;
111.
Image7: TImage;
112.
ComboBox1: TComboBox;
113.
Edit2: TEdit;
114.
GroupBox2: TGroupBox;
115.
Image2: TImage;
116.
BitBtn2: TBitBtn;
117.
BitBtn1: TBitBtn;
118.
BitBtn3: TBitBtn;
119.
GroupBox6: TGroupBox;
120.
Image4: TImage;
121.
SpeedButton24: TSpeedButton;
122.
SpeedButton34: TSpeedButton;
123.
SpeedButton35: TSpeedButton;
124.
SpeedButton37: TSpeedButton;
125.
SpeedButton38: TSpeedButton;
126.
SpeedButton36: TSpeedButton;
127.
Image5: TImage;
128.
Image6: TImage;
129.
DBEdit20: TDBEdit;
130.
DBEdit21: TDBEdit;
131.
DBEdit22: TDBEdit;
132.
BitBtn4: TBitBtn;
133.
Edit3: TEdit;
134.
Edit4: TEdit;
135.
Edit5: TEdit;
136.
Edit6: TEdit;
137.
procedure Button1Click(Sender: TObject);
138.
procedure BitBtn1Click(Sender: TObject);
139.
procedure BitBtn2Click(Sender: TObject);
140.
procedure SpeedButton20Click(Sender: TObject);
141.
procedure SpeedButton22Click(Sender: TObject);
142.
procedure N7Click(Sender: TObject);
143.
procedure Y1Click(Sender: TObject);
144.
procedure Edit2Change(Sender: TObject);
145.
procedure N5Click(Sender: TObject);
146.
procedure BitBtn3Click(Sender: TObject);
147.
procedure N8Click(Sender: TObject);
148.
procedure N9Click(Sender: TObject);
149.
procedure Timer1Timer(Sender: TObject);
150.
procedure Image4Click(Sender: TObject);
151.
procedure BitBtn4Click(Sender: TObject);
152.
procedure N10Click(Sender: TObject);
86
153.
procedure N6Click(Sender: TObject);
154.
procedure N20Click(Sender: TObject);
А қосымшасының жалғасы
155.
private
156.
{ Private declarations }
157.
public
158.
{ Public declarations }
159.
end;
160.
var
161.
Form3: TForm3;
162.
implementation
163.
uses Unit1, Unit4, Unit2, Unit6;
164.
{$R *.dfm}
165.
procedure TForm3.Button1Click(Sender: TObject);
166.
begin
167.
if openpicturedialog1.Execute then
168.
dbimage1.Picture.LoadFromFile(openpicturedialog1.FileName);
169.
dbimage1.CopyToClipboard;
170.
dbimage1.PasteFromClipboard;
171.
end;
172.
procedure TForm3.BitBtn1Click(Sender: TObject);
173.
var Excel, WorkBook, Sheet: Variant;
174.
WorkbookName, WorkbookToSave: string;
175.
i,j: Integer;
176.
name:string ;
177.
begin
178.
//Шаблон накладной хранится в папке Шаблоны:
179.
WorkbookName := GetCurrentDir + '\Шаблоны\билет.xls';
180.
//Сформированный документ сохраняется во временную папку Документы:
181.
WorkbookToSave := GetCurrentDir + '\Шаблоны\,билет № '+dbgrid1.Fields[0].Text
+'.xls';
182.
Excel := CreateOleObject('Excel.Application');
183.
try
184.
Excel.Workbooks.Open(WorkbookName);
185.
adotable1.next;
186.
adotable1.Prior;
187.
Excel.Cells[20,3]:=DBedit3.Text;
188.
Excel.Cells[29,7]:=DBedit1.Text;
189.
Excel.Cells[20,6]:=DBedit2.Text;
190.
Excel.Cells[20,9]:=DBedit4.Text;
191.
Excel.Cells[15,2]:=DBedit5.Text;
192.
Excel.Cells[15,6]:=DBedit7.Text;
193.
Excel.Cells[15,4]:=DBedit6.Text;
194.
Excel.Cells[31,7]:=DBedit9.Text;
195.
Excel.Cells[33,7]:=DBcombobox1.Text;
196.
Excel.Cells[21,3]:=DBedit10.Text;
197.
Excel.Cells[21,6]:=DBedit11.Text;
198.
Excel.Cells[21,9]:=DBedit12.Text;
199.
Excel.Cells[23,3]:=DBedit14.Text;
200.
Excel.Cells[27,3]:=DBedit19.Text;