//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void bazazam()
{
//TU JEST PROBLEM//
Form2->ADODataSet1->CommandText="select lp, nr_zamowienia, odbiorca, nr_zlecenia, data_1, data_2, data_3, stan_zam from rz_baza_zamowien where lp like '%"+Form2->Edit1->Text+"%' and nr_zamowienia like '%"+Form2->Edit2->Text+"%' and odbiorca like '%"+Form2->Edit3->Text+"%' and nr_zlecenia like '%"+Form2->Edit4->Text+"%' and data_1 like '%"+Form2->Edit5->Text+"%'and data_2 like '%"+Form2->Edit6->Text+"%' and data_3 like '%"+Form2->Edit7->Text+"%' and stan_zam like '%"+Form2->ComboBox1->Text+"%' ";
Form2->ClientDataSet1->Active=true;
Form2->ClientDataSet1->Refresh();
}
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &Action)
{
Action = caFree;
Form1->sform1=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Edit2Change(TObject *Sender)
{
//TO DZIAŁA//
ADODataSet1->CommandText="select lp, nr_zamowienia, odbiorca, nr_zlecenia, data_1, data_2, data_3, stan_zam from rz_baza_zamowien where lp like '%"+Edit1->Text+"%' and nr_zamowienia like '%"+Edit2->Text+"%' and odbiorca like '%"+Edit3->Text+"%' and nr_zlecenia like '%"+Edit4->Text+"%' and data_1 like '%"+Edit5->Text+"%'and data_2 like '%"+Edit6->Text+"%' and data_3 like '%"+Edit7->Text+"%' and stan_zam like '%"+ComboBox1->Text+"%' ";
ClientDataSet1->Active=true;
ClientDataSet1->Refresh();
}
//---------------------------------------------------------------------------