Add (Form3. ADOQuery2 ['PrichOtkl']);. ADOQuery2. Next;;. ADOQuery1. Edit;. ADOQuery1. Next;;. ShowModal;; TMainFormSek. F11Click (Sender: TObject);. Visible: = True;;. p align="justify"> ------------------------------------------ ----------------
------------------------------------------ ----------------;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, StdCtrls, CheckLst, Mask, DB, ADODB, Buttons, ComObj; = class ( TForm): TLabel;: TLabel;: TLabel;: TLabel;: TEdit;: TEdit;: TComboBox;: TMaskEdit;: TLabel;: TMemo;: TCheckListBox;: TLabel;: TADOQuery;: TBitBtn;: TBitBtn;: TADOTable; : TADOTable;: TADOTable; BitBtn1Click (Sender: TObject); BitBtn2Click (Sender: TObject);
{Private declarations}
{Public declarations};: TfrmNewDoc; Authorization, MainSek;
{$ R *. dfm} TfrmNewDoc. BitBtn1Click (Sender: TObject); w: variant;: integer;: string;: = ExtractFilePath (paramstr (0));: = CreateOleObject ('Word. Application');. visible: = true;. Documents. add;. ActiveDocument. SaveAs (s + '' + edit1. Text + '. Doc');. ADOQuery3. Insert;. ADOQuery3 ['Name_Doc']: = edit1. Text;. ADOQuery3 ['Type_Doc']: = ComboBox1. Text;. ADOQuery3 ['Primechanie']: = Memo1. Text;. ADOQuery3 ['Date_Create']: = strtoDateTime (Edit2. Text);. ADOQuery3 ['Srok']: = strtoDate (MaskEdit1. Text);. ADOQuery3 ['Path']: = s + '' + edit1. Text + '. doc ';. ADOQuery3 ['Stat']: = 'Неутвержден';. ADOQuery3 ['ID_Sek']: = AuthForm. KeyUser;. ADOQuery3. Post; i: = 0 to (CheckListBox1. Items. Count - 1) do (CheckListBox1. Checked [i]) then. Insert; ADOTable3. Locate ('Login', CheckListBox1. Items. Strings [i], []) then ['id_user']: = ADOTable3 ['id_user'];. Close;. SQL. Clear;. SQL. Append ('SELECT Top 1 Key' +
'FROM Documents' +
'Order by Key Desc');. Open;. Open; ['id_document']: = inttostr (ADOQuery1 ['Key']); ['Status']: = '1 ';. Post;;;. ADOQuery3. Active: = false;. ADOQuery3. Active: = true;. ADOQuery3. Fields [0]. Visible: = false;. ADOQuery3. Fields [6]. Visible: = false;. ADOQuery3. Fields [7]. Visible: = false;. ADOQuery3. Fields [1]. DisplayWidth: = 20;. ADOQuery3. Fields [2]. DisplayWidth: = 20;. ADOQuery3. Fields [3]. visible: = false;. ADOQuery3. Fields [4]. DisplayWidth: = 20;. ADOQuery3. Fields [5]. DisplayWidth: = 20;. ADOQuery3. Fields [8]. DisplayWidth: = 20;; TfrmNewDoc. BitBtn2Click (Sender: TObject);;;. br/>