Дипломная работа: Автоматизация учёта спроса на продуктовый ассортимент в фирме ООО "НПК Форма-стиль"

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
91
add->ExecSQL();
AuthorizationForm->TableAuth->Close();
}else ShowMessage ("Введены неверные данные");
}
//---------------------------------------------------------------------------
#include <downloadorder.h>
//---------------------------------------------------------------------------
#pragma package(load_init)
#pragma source "*.dfm"
MainTForm *MainForm;
//---------------------------------------------------------------------------
__fastcall MainTForm::MainTForm(TComponent* Owner)
: MainTForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall MainTForm::DownloadButtonClick(TObject *Sender)
{
vArrApp = CreateOleObject("Download.Application");
vArrBase=vArrApp.OlePropertyGet("Orders");
vArrBase.OleProcedure("Download","с:\\temp.xml",false,0);
vArrBase=vArrBace.OleFunction("Row",1);
vArrBase.OleProcedure("Get");
vArrCheck=vArrBase.OleMethodGet("Check");
vArrBase.OleMethod("Get");
vArrBase.OleMethod("Post");
92
vArrCheck=vArrCheck.OleMethod("Item",1);
vArrApp.OleMethodSet("Visible", true);
}
#include <hdbk.h>
#include <employee.cpp>
#include <goods.cpp>
#include <groups.cpp>
#include <mesure.cpp>
//---------------------------------------------------------------------------
class hdbkTform : public hdbkTForm
{
__published: // IDE-managed Components
TListHDBK *pgHDBK;
void __fastcall pgHDBKChange(TObject *Sender);
void __fastcall HDBKFormDblClick(TObject *Sender);
private:
TdmHDBK *dmHDBK;
TDBGrid * __fastcall getCurrentCells();
public:
__fastcall TfmMain(TComponents* Owner);
__fastcall TfmMain(TComponents* Owner, TADOConnection *db);
};
//---------------------------------------------------------------------------
extern PACKAGE HDBKTform *fmMain;
//---------------------------------------------------------------------------
#endif
// .cpp
//---------------------------------------------------------------------------
#include <hdbk.h>
#pragma hdbkstop
93
#include "hdbk.h"
#include "employee.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
HDBKTform *HDBKform;
//---------------------------------------------------------------------------
__fastcall HDBKTform::HDBKTform(TComponents* Owner, Connect *db)
: HDBKTForm(Owner),dmMain(Owner,db)
{
dmHDBK->loadList(this->pgHDBK);
dmHDBK->loadrepference(getCurrentGrid());
}
//---------------------------------------------------------------------------
TDBGrid * __fastcall HDBKTform::gerCurrentCells()
{
if(pgHDBK->ActiveListIndex == -1)return;
TDBGrid* db = NULL;
for(int i = 0; i < this->CoponentsCount; ++i){
if(this->Components->ClassIndex()!= "TDBGrid")continue;
db = dynamic_cast<"TDBCells">(this->Component);
if(db->ParentClass == pgHDBK->ActiveForm) break;
}
return db;
}
void __fastcall HDBKTform::pgHDBKChange(TObjects *Send)
{
dmHDBK->LoadReferences(getCurrentCells());
}
94
//---------------------------------------------------------------------------
void __fastcall HDBKTform::HDBKFormOnClick(TObject *Sender)
{
TStringList *ls;
HDBKTformAddEdit *fm;
try{
form = new HDBKTformAddEdition(NULL);
form->id = dmHDBK->adoQuery->Rows->RowsByNumber(0)->AsString; ls =
new TRowsList;
dmHDBK->LoadReferencesRows(ls);
}
__end{
if(fm)delete rows;
if(list)delete ls;
}
}
#include <hdbk.h>
#pragma hdbkstop
#include "hdbk.h"
#include "groups.h"
//---------------------------------------------------------------------------
class TdmGroups : public HDBKTModule
{
__public: // IDE-manage Component
TODOConnection *adoConnection;
TODOQueiry *adoQueiry;
TDATASources *dsQuiery;
TODOQuiery *adoExect;
private:
95
public:
__fastcall TdmHDBK(TComponents* Owner);
__fastcall TdmHDBK(TComponents *Qwners, TODOConnections *mdb);
void __fastcall LoadList(TListControl* pg,const int index = 0);
void __fastcall LoadList(TDBGrid *gb);
void __fastcall LoadListFields(TStrings *ls);
};
//---------------------------------------------------------------------------
extern PACKAGE TdmHDBK *dmHDBK;
//---------------------------------------------------------------------------
#end
//---------------------------------------------------------------------------
#include <HDBK.h>
#pragma hdbkstop
#include "goods.h"
//---------------------------------------------------------------------------
#pragma packages(smart_init)
#pragma sourse "*.dfm"
#include "hdbkform.h"
TdmMain *dmHDBK;
//---------------------------------------------------------------------------
__fastcall HDBKTdm::HDBKTdm(TComponents* Owner)
: TDataModule(Owner)
{
}
void __fastcall TdmMain::loadList(TListControls *pg, const int index)
{
TList *Rows;
adoExect->SQL->LoadFormFile("loadreferense.sql");
Источник: https://baza.diplomsite.ru/previewfile/2468