ies, TeeProcs, Chart, DbChart;=class (TForm): TDBGrid ;: TButton ;: TButton ;: TButton ;: TLabel ;: TButton ;: TButton ;: TButton; Button4Click (Sender: TObject); DBGrid1TitleClick (Column: TColumn); Button1Click (Sender: TObject); Button2Click (Sender: TObject); Button3Click (Sender: TObject); Button5Click (Sender: TObject); Button6Click (Sender: TObject);
{Private declarations}
{Public declarations} ;: TForm3; mainDataModuleUnit, Unit7, mainUnit, Unit12;
{$ R * .dfm} TForm3.Button4Click (Sender: TObject) ;. Hide; .Show;; TForm3.DBGrid1TitleClick (Column: TColumn) ;. table2.IndexFieldNames:=Column.FieldName ;; TForm3.Button1Click (Sender: TObject) ;. Table2.IndexFieldNames:= FIO raquo ;;; TForm3.Button2Click (Sender: TObject ) ;. Table2.IndexFieldNames:= Stash raquo ;;; TForm3.Button3Click (Sender: TObject) ;. ShowModal ;; TForm3.Button5Click (Sender: TObject) ;. ShowModal ;; TForm3.Button6Click (Sender: TObject); messageDlg ( Видалити запис? ,, [mbYes, mbNo], 0)=mrYes then mainDataModule.Table2.Delete ;;. Unit4 ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, ExtCtrls, TeeProcs , TeEngine, Chart, DbChart, Series;=class (TForm): TDBChart ;: TPieSeries ;: TBarSeries; FormCreate (Sender: TObject);
{Private declarations}
{Public declarations} ;: TForm4; mainDataModuleUnit;
{$ R * .dfm} TForm4.FormCreate (Sender: TObject) ;. Query4.Active:=true;;.Unit5 ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, StdCtrls, Mask, DBCtrls, Buttons, ComCtrls;=class (TForm): TLabel ;: TLabel ;: TLabel ;: TLabel ;: TBitBtn ;: TBitBtn ;: TEdit ;: TEdit ;: TEdit ;: TDateTimePicker; BitBtn1Click (Sender:TObject); BitBtn2Click (Sender: TObject); FormCreate (Sender: TObject);
{Private declarations}
{Public declarations} ;: TForm5; mainDataModuleUnit, mainUnit, Unit4, Sotrudniki;
{$ R * .dfm} TForm5.BitBtn1Click (Sender: TObject); DateTimePicker1.Date lt; Date then ( Ви намагаєтеся додати заднім числом! Raquo;)
else (Edit1.Text= 01360179 ) or (Edit1.Text= 02369899 ) or (Edit1.Text= 59207788 ) then ( Неприпустимий номер рахунку! raquo ;)
elsemainDataModule.Table5 do;(laquo;N_chetaraquo;).AsString:=Edit1.Text;(laquo;Dataraquo;).AsString:=DateToStr(DateTimePicker1.Date);(laquo;Prixodraquo;).AsString:=Edit2.Text;(laquo;Rasxodraquo;).AsString:=Edit3.Text;(laquo;Tab_N_sotrraquo;).AsString:=laquo;3raquo;;;;;.Query1.Active:=false;.Query1.Active:=true;.DBGrid1.Refresh;.Close;;;;TForm5.BitBtn2Click(Sender: TObject) ;. Close ;; TForm5.FormCreate (Sender: TObject) ;. Date:=Date ;;. Unit6 ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, StdCtrls, Grids, DBGrids, DB, DBTables, shellapi, ComObj;=class (TForm): TTable ;: TDataSource ;: TDBGrid ;: TButton ;: TButton ;: TButton ;: TButton ;: TButton; Button1Click (Sender: TObject); Button2Click (Sender: TObject); Button3Click (Sender: TObject); Button4Click (Sender: TObject); Button5Click (Sender: TObject);
{Private declarations}
{Public declarations} ;: TForm6; Unit11, mainUnit;
{$ R * .dfm} TForm6.Button1Click (Sender: TObject) ;. Insert; .ShowModal ;; TForm6.Button2Click (Sender: TObject) ;. ShowModal ;; TForm6.Button3Click (Sender: TObject); messageDlg ( Видалити запис? ,, [mbYes, mbNo], 0)=mrYes then Table1.Delete ;; TForm6.Button4Click (Sender: TObject) ;. Hide; .show ;; TForm6.Button5Click ( Sender: TObject) ;: string ;, Document, ADocument: OleVariant ;: Integer ;: string ;: OleVariant; CompareBm (ABmName: string; const AName: string): Boolean ;: Integer;:=Pos ( __ raquo ;, ABmName); i gt; 0 then (ABmName, i, Length (ABmName) - i + 1);:=SameText (ABmName, AName) ;;:=ExtractFilePath (Application.ExeName) + dogovor.dot raquo ;;
//Якщо ні то запускаємо:=CreateOleObject ( Word.Application ); E: Exception do ( Не вдається запустити Word! # 13 # 10 + E.Message);
Exit ;;;. Cursor:=crHourGlass;
//Створення нового документа на основі шаблону
Document:=WordApp.Documents.Add (Template:=TempleateFileName, NewTemplate:=False);:=Document;
//Замінюємо закладки на дані
for i:=ADocument.Bookmarks.Count downto 1 do:=ADocument.Bookmarks.Item (i) .Name;:=ADocument.Bookmarks.Item (i) .Range; CompareBm (BookmarkName, klientnum ) then.Text:=Table1.FieldByName ( N_dogovora ). AsStringCompareBm (BookmarkName, klientname1 ) then.Text:=Table1.FieldByName ( FIO ). AsString; CompareBm (BookmarkName, klientname ) then.Text:=Table1.FieldByName ( FIO ). AsStringCompareBm (BookmarkName, passn ) then.Text:=Table1.FieldByN...