Open;; TForm1.Button17Click (Sender: TObject); summa: String;. Enabled: = true;. Enabled: = true;. Enabled: = true;. Close ;. SQL.Clear;. Lines [0]: = 'select * from dogovor';. SQL: = Memo2.Lines;. Open;. Last;: = IBQuery2.RecordCount +1;. Close;. SQL.Clear;
// else begin.SQL.Clear;. Lines.Clear;. Lines [0]: = 'Insert into KORZINA (ID, NAIMENOVANIE, RAZMER, CENA, UPAKOVKA, GARANTSROK, ID_DOGOVOR, ID_OTDEL) '+
'values ​​(' + IBQuery1.FieldByName ('ID'). AsString + ',''' +. FieldByName ('NAIMENOVANIE'). AsString +'' ',''' +. FieldByName ('RAZMER'). AsString +'' ',''' +. FieldByName ('CENA'). AsString +'' ',''' +. FieldByName ('UPAKOVKA'). AsString +'' ','' '+. FieldByName (' GARANTSROK '). AsString +''','' '+ (dogovor) +''','' '+. FieldByName (' ID_OTDEL '). AsString +''') ';. SQL : = Memo2.Lines;. Open;. Transaction.Commit;. Close;. Lines.Clear;
// end;. Close;. SQL.Clear;. Lines [0]: = 'select SUM (CENA) from KORZINA';. SQL: = Memo2.Lines;. Open;. Caption : = IBQuery2.FieldByName ('SUM'). AsString;. Close;. SQL.Clear;. Lines [0]: = 'select * from KORZINA';. SQL: = Memo2.Lines;. Open;; TForm1.Button16Click (Sender: TObject);. SQL.Text: = 'delete from KORZINA' +
'where id =' + IBQuery2.FieldByName ('ID'). AsString;. Open;. Transaction.Commit;. Close;. Lines.Clear;. Lines [0]: = 'select SUM (CENA) from KORZINA ';. SQL: = Memo2.Lines;. Open; IBQuery2.FieldByName (' SUM '). AsString ='' then.Caption: = '0' else.Caption: = IBQuery2.FieldByName (' SUM '). AsString;. Close;. Lines.Clear;. Lines [0]: =' select * from KORZINA ';. SQL: = Memo2.Lines;. Open;. Last; IBQuery2.RecordCount = 0 then begin. Enabled: = false;. Enabled: = false;;; TForm1.Button22Click (Sender: TObject);. Enabled: = false;. Enabled: = false;. Enabled: = false;. Caption: = '0 ';. Close ;. SQL.Clear;. SQL.Text: = 'DELETE FROM KORZINA';. Open;. Transaction.Commit;. Close;; TForm1.Button15Click (Sender: TObject);. Visible: = true;. Edit4.Text: = Form1.Label8.Caption;; TForm1.Button23Click (Sender: TObject);. Close;. Lines [0]: = 'select * from TOVARY_DOGOVOR';. SQL: = Memo1.Lines;. Open;; TForm1.Button24Click ( Sender: TObject);. Close;. Lines [0]: = 'select * from TOVARY_DOGOVOR where id_otdel = 1';. SQL: = Memo1.Lines;. Open;; TForm1.Button25Click (Sender: TObject);. Close; . Lines [0]: = 'select * from TOVARY_DOGOVOR where id_otdel = 2';. SQL: = Memo1.Lines;. Open;; TForm1.Button26Click (Sender: TObject);. Close;. Lines [0]: = ' select * from TOVARY_DOGOVOR where id_otdel = 3 ...