Додаток 1
Лістинг модуля «MainF.cpp»
#include <vcl.h>
#pragma hdrstop
#include "MainF.h"
#include "SkladF.h"
#include "ClientsF.h"
#include "InputF.h"
#include "PostavF.h"
#include "CategoryF.h"
#include "RekvizitF.h"
#include "OutputF.h"
#include "InputStatF.h"
#include "OutputStatF.h"
#include "AboutF.h"
#include "DMF.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TMainForm *MainForm;
__fastcall TMainForm::TMainForm(TComponent* Owner)
: TForm(Owner)
{
}
void toExcel (Variant App,const char *Exc, int off, String data, bool Bold = false)
{
try {
if (Bold == true)
{
App.OlePropertyGet("Range", Exc).OlePropertyGet("Offset", off).OlePropertyGet("Font").OlePropertySet("Size",12);
App.OlePropertyGet("Range", Exc).OlePropertyGet("Offset", off).OlePropertyGet("Font").OlePropertySet("Bold",true);
}
App.OlePropertyGet("Range", Exc).OlePropertyGet("Offset", off).OlePropertySet("Value", data.c_str());
} catch(...) { ; }
}
void toExcel(Variant App,const char *Exc, double data)
{
try {
App.OlePropertyGet("Range", Exc).OlePropertySet("Value", data);
} catch(...) { ; }
}
void toExcel(Variant App,const char *Exc, int data)
{
try {
App.OlePropertyGet("Range", Exc).OlePropertySet("Value", data);