void __fastcall TFormReport::FrameList1GridView1DataControllerFilterChanged( TObject *Sender) { AnsiString str = ""; TMyFields::iterator iter; for(int i = 0; i<FrameList1->Query->Fields->Count; i++) { AnsiString fname = FrameList1->Query->Fields->Fields[i]->FieldName; AnsiString caption = (AnsiString)Fields[fname]; if(caption.IsEmpty()) caption = "false"; str += caption + (i < FrameList1->Query->Fields->Count-1?" ,":" "); } SetDisplayLabels(FrameList1->Query, FrameList1->GridView1->DataController,str); }
//--------------------------------------------------------------------------- void __fastcall TFormReport::Refresh() { if(FrameList1->Query->Fields->Count) FrameList1->Refresh(FrameList1->Query->Fields->Fields[0]->FieldName); else { FrameList1->Query->Close(); FrameList1->Query->Open(); } AnsiString str = ""; TMyFields::iterator iter; for(int i = 0; i<FrameList1->Query->Fields->Count; i++) { AnsiString fname = FrameList1->Query->Fields->Fields[i]->FieldName; AnsiString caption = (AnsiString)Fields[fname]; if(caption.IsEmpty()) caption = "false"; str += caption + (i < FrameList1->Query->Fields->Count-1?" ,":" "); } SetDisplayLabels(FrameList1->Query, FrameList1->GridView1->DataController,str); }
//--------------------------------------------------------------------------- void __fastcall TPrihodForm::Refresh() { FrameList1->Refresh("id_prihod"); SetDisplayLabels(FrameList1->Query, FrameList1->GridView1->DataController, "false,false, Код ,Название ,Количество ,Цена "); Document->Fill(Document->Nomer); Label2->Caption = FormatFloat("0.00",Document->Suma); Document->DataDok = EditDate->Date; if(FrameList1->Query->RecordCount) { EditDate->Enabled = false; EditPartner->Enabled = false; } else { EditDate->Enabled = true; EditPartner->Enabled = true; } }
//--------------------------------------------------------------------------- void __fastcall TNakladnaForm::Refresh() { FrameList1->Refresh("id_rashod"); SetDisplayLabels(FrameList1->Query, FrameList1->GridView1->DataController, "false,false, Код ,Название ,Количество ,Цена продажи,Цена со скидкой"); Document->Fill(Document->Nomer); Label2->Caption = FormatFloat("0.00",Document->Suma); Document->DataDok = EditDate->Date; if(FrameList1->Query->RecordCount) { EditDate->Enabled = false; EditPartner->Enabled = false; ButtonKlient->Enabled = false; cxSpinEditProcent->Enabled = false; } else { EditDate->Enabled = true; EditPartner->Enabled = true; ButtonKlient->Enabled = true; cxSpinEditProcent->Enabled = true; } }
void __fastcall TPartnerListForm::Refresh() { FrameList1->Refresh("id_partner"); SetDisplayLabels(FrameList1->Query, FrameList1->GridView1->DataController, "Код ,Название , Сальдо, false"); }