Лістинг Rashod.cpp
#include <vcl.h>
#pragma hdrstop
#include "rashod.h"
#include "DataModul.h"
#include "client.h"
#include "report.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TrashodForm *rashodForm;
void ReconectToDB()
{
DM -> content_DataSet -> Close();
DM -> product_DataSet -> Close();
DM -> zakaz_DataSet -> Close();
DM -> client_DataSet -> Close();
DM -> type_DataSet-> Close();
DM -> type_DataSet-> Open();
DM -> content_DataSet -> Open();
DM -> product_DataSet -> Open();
DM -> zakaz_DataSet -> Open();
DM -> client_DataSet -> Open();
}
void AddIntoContent()
{
DM -> content_DataSet -> FieldByName("id_tovar") -> AsInteger = DM -> product_DataSet -> FieldByName("id_tovar") -> AsInteger;
DM -> content_DataSet -> FieldByName("mark") -> AsString = DM -> product_DataSet -> FieldByName("mark") -> AsString;
DM -> content_DataSet -> FieldByName("config") -> AsString = DM -> product_DataSet -> FieldByName("config") -> AsString;
DM -> content_DataSet -> FieldByName("serial") -> AsString = DM -> product_DataSet -> FieldByName("serial_nom") -> AsString;
DM -> content_DataSet -> FieldByName("kilk") -> AsInteger ++;
DM -> content_DataSet -> FieldByName("price") -> AsCurrency = DM -> product_DataSet -> FieldByName("price") -> AsCurrency;
DM -> content_DataSet -> FieldByName("garanty") -> AsInteger = DM -> product_DataSet -> FieldByName("garanty") -> AsInteger;
DM -> content_DataSet -> FieldByName("nom_zakaz") -> AsInteger = DM -> zakaz_DataSet -> FieldByName("nom_zakaz") -> AsInteger;
}
void AddToItem()
{
DM -> IBStoredProc3 -> ParamByName("i_id_order") -> AsInteger = DM -> content_DataSet -> FieldByName("id_order") -> AsInteger;
DM -> IBStoredProc3 -> ParamByName("i_id_tovar") -> AsInteger = DM -> content_DataSet -> FieldByName("id_tovar") -> AsInteger;
DM -> IBStoredProc3 -> ParamByName("i_mark") -> AsString = DM -> content_DataSet -> FieldByName("mark") -> AsString;
DM -> IBStoredProc3 -> ParamByName("i_config") -> AsString = DM -> content_DataSet -> FieldByName("config") -> AsString;
DM -> IBStoredProc3 -> ParamByName("i_serial") -> AsString = DM -> content_DataSet -> FieldByName("serial") -> AsString;
DM -> IBStoredProc3 -> ParamByName("i_kilk") -> AsInteger = DM -> content_DataSet -> FieldByName("kilk") -> AsInteger;
DM -> IBStoredProc3 -> ParamByName("i_price") -> AsCurrency = DM -> content_DataSet -> FieldByName("price") -> AsCurrency;
DM -> IBStoredProc3 -> ParamByName("i_garanty") -> AsInteger = DM -> content_DataSet -> FieldByName("garanty") -> AsInteger;