Файл: Проектирование реализации операций бизнес-процесса «Складской учет» (Характеристика существующих бизнес –процессов).pdf

ВУЗ: Не указан

Категория: Курсовая работа

Дисциплина: Не указана

Добавлен: 12.03.2024

Просмотров: 42

Скачиваний: 0

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

};

//---------------------------------------------------------------------------

extern PACKAGE TFormManager *FormManager;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef OtchetManagerH

#define OtchetManagerH

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBGrids.hpp>

#include <Grids.hpp>

#include <Menus.hpp>

//---------------------------------------------------------------------------

class TFormOtchetManager : public TForm

{

__published: // IDE-managed Components

TDBGrid *DBGridManager;

TADODataSet *ADODataSetManager;

TDataSource *DataSourceManager;

TADODataSet *ADODataSetDolgnost;

TDataSource *DataSourceDolgnost;

TADODataSet *ADODataSetComputerTehnika;

TDataSource *DataSourceComputerTehnika;

TADODataSet *ADODataSetHistory;

TDataSource *DataSourceHistory;

TPopupMenu *PopupMenu1;

TMenuItem *N1;

TButton *ButtonExit;

void __fastcall FormShow(TObject *Sender);

void __fastcall N1Click(TObject *Sender);

void __fastcall ButtonExitClick(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TFormOtchetManager(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TFormOtchetManager *FormOtchetManager;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef ProdanoH

#define ProdanoH

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBGrids.hpp>

#include <Grids.hpp>

#include <DBCtrls.hpp>

#include <Menus.hpp>

//---------------------------------------------------------------------------

class TFormProdano : public TForm

{

__published: // IDE-managed Components

TDBGrid *DBGridComputerTehnika;

TADODataSet *ADODataSetComputerTehnika;

TDataSource *DataSourceComputerTehnika;

TAutoIncField *ADODataSetComputerTehnikaCod;

TWideStringField *ADODataSetComputerTehnikaName;

TBCDField *ADODataSetComputerTehnikaCena;

TBooleanField *ADODataSetComputerTehnikaProdan;

TDateTimeField *ADODataSetComputerTehnikaDataPostup;

TMemoField *ADODataSetComputerTehnikaOpisanie;

TBlobField *ADODataSetComputerTehnikaPicture;

TIntegerField *ADODataSetComputerTehnikaCodVidTehniki;

TDataSource *DataSourceVidTehniki;

TADODataSet *ADODataSetVidTehniki;

TStringField *ADODataSetComputerTehnikaNameVidTehniki;

TDBImage *DBImageFoto;

TDBMemo *DBMemoOpisanie;

TButton *ButtonExit;

TButton *ButtonPrint;

TPopupMenu *PopupMenu1;

TMenuItem *N1;

TMenuItem *N2;

TDataSource *DataSourceHistory;

TADODataSet *ADODataSetHistory;

TAutoIncField *ADODataSetHistoryCod;

TIntegerField *ADODataSetHistoryCodComputerTehnika;

TIntegerField *ADODataSetHistoryCodManager;

TDateTimeField *ADODataSetHistoryDataProdazhi;

TBCDField *ADODataSetHistoryCena;

TDateField *ADODataSetComputerTehnikaDataProdazhi;

void __fastcall ButtonExitClick(TObject *Sender);

void __fastcall DBGridComputerTehnikaCellClick(TColumn *Column);

void __fastcall FormShow(TObject *Sender);

void __fastcall ButtonPrintClick(TObject *Sender);

void __fastcall N1Click(TObject *Sender);

void __fastcall N2Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TFormProdano(TComponent* Owner);

};

//---------------------------------------------------------------------------


extern PACKAGE TFormProdano *FormProdano;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef ProdazhaH

#define ProdazhaH

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ComCtrls.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBCtrls.hpp>

#include <DBGrids.hpp>

#include <Grids.hpp>

#include <Menus.hpp>

//---------------------------------------------------------------------------

class TFormProdazha : public TForm

{

__published: // IDE-managed Components

TLabel *Label1;

TDateTimePicker *DateTimePickerDataProdazhi;

TGroupBox *GroupBox1;

TDBGrid *DBGridComputerTehnika;

TADODataSet *ADODataSetComputerTehnika;

TDataSource *DataSourceComputerTehnika;

TAutoIncField *ADODataSetComputerTehnikaCod;

TWideStringField *ADODataSetComputerTehnikaName;

TBCDField *ADODataSetComputerTehnikaCena;

TBooleanField *ADODataSetComputerTehnikaProdan;

TDateTimeField *ADODataSetComputerTehnikaDataPostup;

TMemoField *ADODataSetComputerTehnikaOpisanie;

TBlobField *ADODataSetComputerTehnikaPicture;

TIntegerField *ADODataSetComputerTehnikaCodVidTehniki;

TButton *ButtonProdat;

TGroupBox *GroupBoxOpisanie;

TDBMemo *DBMemoOpisanie;

TDBImage *DBImageFoto;

TButton *ButtonExit;

TADODataSet *ADODataSetHistory;

TDataSource *DataSourceHistory;

TAutoIncField *ADODataSetHistoryCod;

TIntegerField *ADODataSetHistoryCodComputerTehnika;

TIntegerField *ADODataSetHistoryCodManager;

TDateTimeField *ADODataSetHistoryDataProdazhi;

TBCDField *ADODataSetHistoryCena;

TPopupMenu *PopupMenu1;

TMenuItem *N1;

TMenuItem *N2;

void __fastcall FormShow(TObject *Sender);

void __fastcall DBGridComputerTehnikaCellClick(TColumn *Column);

void __fastcall ButtonProdatClick(TObject *Sender);

void __fastcall ButtonExitClick(TObject *Sender);

void __fastcall N1Click(TObject *Sender);

void __fastcall N2Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TFormProdazha(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TFormProdazha *FormProdazha;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef SpravkaH

#define SpravkaH

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

//---------------------------------------------------------------------------

class TFormSpravka : public TForm

{

__published: // IDE-managed Components

TMemo *MemoSpravka;

TMemo *Memo1;

TButton *ButtonExit;

void __fastcall ButtonExitClick(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TFormSpravka(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TFormSpravka *FormSpravka;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef UnitReportH

#define UnitReportH

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <DB.hpp>

#include <DBTables.hpp>

#include <ExtCtrls.hpp>

#include <QRCtrls.hpp>

#include <QuickRpt.hpp>

#include <ADODB.hpp>


//---------------------------------------------------------------------------

class TFormReport : public TForm

{

__published: // IDE-managed Components

TQuickRep *QuickRep1;

TQRBand *QRBand1;

TQRLabel *QRLabel1;

TQRBand *QRBand2;

TQRBand *QRBand3;

TQRLabel *QRLabel2;

TQRLabel *QRLabel3;

TQRLabel *QRLabel4;

TDataSource *DataSourceComputerTehnika;

TQRLabel *QRLabel5;

TQRBand *QRBand4;

TQRDBText *QRDBText1;

TQRDBText *QRDBText2;

TQRDBText *QRDBText3;

TQRDBText *QRDBText4;

TADODataSet *ADODataSetComputerTehnika;

TAutoIncField *ADODataSetComputerTehnikaCod;

TWideStringField *ADODataSetComputerTehnikaName;

TBCDField *ADODataSetComputerTehnikaCena;

TBooleanField *ADODataSetComputerTehnikaProdan;

TDateTimeField *ADODataSetComputerTehnikaDataPostup;

TMemoField *ADODataSetComputerTehnikaOpisanie;

TBlobField *ADODataSetComputerTehnikaPicture;

TIntegerField *ADODataSetComputerTehnikaCodVidTehniki;

TADODataSet *ADODataSetVidTehniki;

TDataSource *DataSourceVidTehniki;

TAutoIncField *ADODataSetVidTehnikiCod;

TWideStringField *ADODataSetVidTehnikiName;

TStringField *ADODataSetComputerTehnikaNameVidTehniki;

void __fastcall QuickRep1AfterPreview(TObject *Sender);

void __fastcall FormActivate(TObject *Sender);

void __fastcall FormShow(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TFormReport(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TFormReport *FormReport;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef UnitReport2H

#define UnitReport2H

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <DB.hpp>

#include <DBTables.hpp>

#include <ExtCtrls.hpp>

#include <QRCtrls.hpp>

#include <QuickRpt.hpp>

#include <ADODB.hpp>

//---------------------------------------------------------------------------

class TFormReport2 : public TForm

{

__published: // IDE-managed Components

TQuickRep *QuickRep1;

TQRBand *QRBand1;

TQRLabel *QRLabel1;

TQRBand *QRBand2;

TQRBand *QRBand3;

TQRLabel *QRLabel2;

TQRLabel *QRLabel3;

TQRLabel *QRLabel4;

TDataSource *DataSourceComputerTehnika;

TQRLabel *QRLabel5;

TQRBand *QRBand4;

TQRDBText *QRDBText1;

TQRDBText *QRDBText2;

TQRDBText *QRDBText3;

TQRDBText *QRDBText4;

TADODataSet *ADODataSetComputerTehnika;

TAutoIncField *ADODataSetComputerTehnikaCod;

TWideStringField *ADODataSetComputerTehnikaName;

TBCDField *ADODataSetComputerTehnikaCena;

TBooleanField *ADODataSetComputerTehnikaProdan;

TDateTimeField *ADODataSetComputerTehnikaDataPostup;

TMemoField *ADODataSetComputerTehnikaOpisanie;

TBlobField *ADODataSetComputerTehnikaPicture;

TIntegerField *ADODataSetComputerTehnikaCodVidTehniki;

TADODataSet *ADODataSetVidTehniki;

TDataSource *DataSourceVidTehniki;

TAutoIncField *ADODataSetVidTehnikiCod;

TWideStringField *ADODataSetVidTehnikiName;

TStringField *ADODataSetComputerTehnikaNameVidTehniki;

TDataSource *DataSourceHistory;

TADODataSet *ADODataSetHistory;

TAutoIncField *ADODataSetHistoryCod;

TIntegerField *ADODataSetHistoryCodComputerTehnika;

TIntegerField *ADODataSetHistoryCodManager;

TDateTimeField *ADODataSetHistoryDataProdazhi;

TBCDField *ADODataSetHistoryCena;

TDateField *ADODataSetComputerTehnikaDataProdazhi;

void __fastcall QuickRep1AfterPreview(TObject *Sender);

void __fastcall FormActivate(TObject *Sender);

void __fastcall FormShow(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TFormReport2(TComponent* Owner);

};

//---------------------------------------------------------------------------


extern PACKAGE TFormReport2 *FormReport2;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef VidTehnikiH

#define VidTehnikiH

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBGrids.hpp>

#include <Grids.hpp>

#include <DBCtrls.hpp>

#include <ExtCtrls.hpp>

#include <Mask.hpp>

//---------------------------------------------------------------------------

class TFormVidTehniki : public TForm

{

__published: // IDE-managed Components

TDBGrid *DBGridVidTehniki;

TADODataSet *ADODataSetVidTehniki;

TDataSource *DataSourceVidTehniki;

TDataSource *DataSourceManager;

TADODataSet *ADODataSetComputerTehnika;

TGroupBox *GroupBox1;

TDBEdit *DBEditName;

TPanel *Panel1;

TButton *ButtonAdd;

TButton *ButtonDelete;

TButton *ButtonChange;

TButton *ButtonExit;

TPanel *Panel2;

TButton *ButtonPost;

TButton *ButtonOtmen;

TAutoIncField *ADODataSetVidTehnikiCod;

TWideStringField *ADODataSetVidTehnikiName;

TAutoIncField *ADODataSetComputerTehnikaCod;

TWideStringField *ADODataSetComputerTehnikaName;

TBCDField *ADODataSetComputerTehnikaCena;

TDateTimeField *ADODataSetComputerTehnikaDataPostup;

TMemoField *ADODataSetComputerTehnikaOpisanie;

TBlobField *ADODataSetComputerTehnikaPicture;

TIntegerField *ADODataSetComputerTehnikaCodVidTehniki;

TBooleanField *ADODataSetComputerTehnikaProdan;

void __fastcall ButtonAddClick(TObject *Sender);

void __fastcall ButtonDeleteClick(TObject *Sender);

void __fastcall ButtonChangeClick(TObject *Sender);

void __fastcall ButtonExitClick(TObject *Sender);

void __fastcall ButtonPostClick(TObject *Sender);

void __fastcall ButtonOtmenClick(TObject *Sender);

void __fastcall FormShow(TObject *Sender);

void __fastcall DBEditNameKeyPress(TObject *Sender, char &Key);

private: // User declarations

public: // User declarations

__fastcall TFormVidTehniki(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TFormVidTehniki *FormVidTehniki;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#ifndef VnalichiiH

#define VnalichiiH

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBGrids.hpp>

#include <Grids.hpp>

#include <DBCtrls.hpp>

#include <Menus.hpp>

//---------------------------------------------------------------------------

class TFormVnalichii : public TForm

{

__published: // IDE-managed Components

TDBGrid *DBGridComputerTehnika;

TADODataSet *ADODataSetComputerTehnika;

TDataSource *DataSourceComputerTehnika;

TAutoIncField *ADODataSetComputerTehnikaCod;

TWideStringField *ADODataSetComputerTehnikaName;

TBCDField *ADODataSetComputerTehnikaCena;

TBooleanField *ADODataSetComputerTehnikaProdan;

TDateTimeField *ADODataSetComputerTehnikaDataPostup;

TMemoField *ADODataSetComputerTehnikaOpisanie;

TBlobField *ADODataSetComputerTehnikaPicture;

TIntegerField *ADODataSetComputerTehnikaCodVidTehniki;

TDataSource *DataSourceVidTehniki;

TADODataSet *ADODataSetVidTehniki;

TStringField *ADODataSetComputerTehnikaNameVidTehniki;

TDBImage *DBImageFoto;

TDBMemo *DBMemoOpisanie;

TButton *ButtonExit;

TButton *ButtonPrint;

TPopupMenu *PopupMenu1;

TMenuItem *N1;

TMenuItem *N2;

void __fastcall ButtonExitClick(TObject *Sender);


void __fastcall DBGridComputerTehnikaCellClick(TColumn *Column);

void __fastcall FormShow(TObject *Sender);

void __fastcall ButtonPrintClick(TObject *Sender);

void __fastcall N1Click(TObject *Sender);

void __fastcall N2Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TFormVnalichii(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TFormVnalichii *FormVnalichii;

//---------------------------------------------------------------------------

#endif

//---------------------------------------------------------------------------

#include <vcl.h>

#pragma hdrstop

#include "ComputerTehnika.h"

#include "DM.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

#pragma resource "*.dfm"

TFormComputerTehnika *FormComputerTehnika;

//---------------------------------------------------------------------------

__fastcall TFormComputerTehnika::TFormComputerTehnika(TComponent* Owner)

: TForm(Owner)

{

}

//---------------------------------------------------------------------------

void __fastcall TFormComputerTehnika::ButtonFotoClick(TObject *Sender)

{ char *s;

OpenDialogFoto->InitialDir= ExtractFileDir(Application->ExeName);

if(OpenDialogFoto->Execute()==true) //вызовдиалогавыборафайла

{DBImageFoto->Visible=true;

s= OpenDialogFoto->FileName.c_str(); //получитьнаименованиевыбранногофайласполнымпутем

DBImageFoto->Picture->LoadFromFile(s);

}

else

{if(ADODataSetComputerTehnikaPicture->Value=="")

DBImageFoto->Visible=false;

}

}

//---------------------------------------------------------------------------

void __fastcall TFormComputerTehnika::FormShow(TObject *Sender)

{

ADODataSetComputerTehnika->Close();

ADODataSetComputerTehnika->Open();

ADODataSetVidTehniki->Close();

ADODataSetVidTehniki->Open();

}

//---------------------------------------------------------------------------

//Выполняется при нажатии кнопки Добавить

void __fastcall TFormComputerTehnika::ButtonAddClick(TObject *Sender)

{

if(ADODataSetComputerTehnika->State==dsBrowse)

{ADODataSetComputerTehnika->Insert();

Panel1->Visible=false;

Panel2->Visible=true;

GroupBox1->Visible=true;

DateTimePickerDataPostup->Date= Date();

DBEditName->SetFocus();

}

}

//---------------------------------------------------------------------------

//Выполняется при нажатии кнопки Удалить

void __fastcall TFormComputerTehnika::ButtonDeleteClick(TObject *Sender)

{

if(ADODataSetComputerTehnika->RecordCount==0) //естьлиданныевБД

{ButtonChange->Enabled=false;//сделать кнопку Изменить недоступной

ButtonDelete->Enabled=false;//сделать кнопку Удалить недоступной

ShowMessage("Данные отсутствуют в БД!"); //вывести сообщение в виде окошка

return;//выходизформы

}

if(ADODataSetComputerTehnika->State==dsBrowse)

if(Application->MessageBoxA("Подтвердитеудалениезаписи

!","Внимание",MB_ICONWARNING+MB_YESNO)==IDYES)

ADODataSetComputerTehnika->Delete();//удалитьзаписьизтаблицыБД

}

//---------------------------------------------------------------------------

//ВыполняетсяпринажатиикнопкиИзменить

void __fastcall TFormComputerTehnika::ButtonChangeClick(TObject *Sender)

{

if(ADODataSetComputerTehnika->RecordCount==0) //есть ли данные в БД - кол-во записей в таблице БД

{ShowMessage("Данные отсутствуют в БД!");//вывести сообщение в виде окошка

return;//выходизформы