Автоматизация движения готовой продукции на складе ООО "Амазон-колорит"
Принципы учета движения готовой продукции на складе. Проектирование логической и физической модели данных. Выбор среды разработки, операционной системы, требования к аппаратному и программному обеспечению. Разработка программы учета готовой продукции.
Рубрика | Программирование, компьютеры и кибернетика |
Вид | дипломная работа |
Язык | русский |
Дата добавления | 09.07.2012 |
Размер файла | 926,6 K |
Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже
Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.
TForm5 *Form5;
__fastcall TForm5::TForm5(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm5::Button1Click(TObject *Sender)
{
Form15->ShowModal();
}
void __fastcall TForm5::Button2Click(TObject *Sender)
{
if (MessageBox(Handle, PChar("Вы уверены что хотите удалить запись?"), PChar("Подтверждение удаления"), MB_YESNOCANCEL)==mrYes)
if (ADOTable1->RecordCount>0) ADOTable1->Delete();
else Application->MessageBoxA("В таблице отсутствуют записи!","Ошибка!");
}
#include <vcl.h>
#pragma hdrstop
#include "Unit6.h"
#include "Unit1.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit12.h"
#include "Unit13.h"
#include "Unit14.h"
#include "Unit15.h"
#include "Unit16.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm6 *Form6;
__fastcall TForm6::TForm6(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm6::Button1Click(TObject *Sender)
{
Form16->ShowModal();
}
void __fastcall TForm6::Button2Click(TObject *Sender)
{
if (ADOTable1->RecordCount>0)
ADOTable1->Delete();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit7.h"
#include "Unit1.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit6.h"
#include "Unit12.h"
#include "Unit13.h"
#include "Unit14.h"
#include "Unit15.h"
#include "Unit16.h"
#include "Unit17.h"
#include "Unit8.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm7 *Form7;
__fastcall TForm7::TForm7(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm7::Button1Click(TObject *Sender)
{
Form17->ShowModal();
}
void __fastcall TForm7::Button2Click(TObject *Sender)
{
if (MessageBox(Handle, PChar("Вы уверены что хотите удалить запись?"), PChar("Подтверждение удаления"), MB_YESNOCANCEL)==mrYes)
if (ADOTable1->RecordCount>0) ADOTable1->Delete();
else Application->MessageBoxA("В таблице отсутствуют записи!","Ошибка!");
}
#include <vcl.h>
#pragma hdrstop
#include "Unit8.h"
#include "Unit1.h"
#include "Unit2.h"
#include "Unit20.h"
#include "Unit23.h"
#include "Unit11.h"
#include "Unit6.h"
#include "Unit9.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm8 *Form8;
__fastcall TForm8::TForm8(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm8::ADOTable2CalcFields(TDataSet *DataSet)
{
ADOTable2stoim->Value=(ADOTable2kolvo->Value*ADOTable2cena->Value)+((ADOTable2kolvo->Value*ADOTable2cena->Value)*ADOTable2nds->Value)/100;
}
void __fastcall TForm8::Button1Click(TObject *Sender)
{
Form20->ShowModal();
}
void __fastcall TForm8::ADOTable2AfterPost(TDataSet *DataSet)
{
Form9->ADOTable2->Locate("data",ADOTable1data_ttn->Value, TLocateOptions());
Form9->ADOTable2->Insert();
Form9->ADOTable2data->Value=ADOTable1data_ttn->Value;
Form9->ADOTable2id_sklada->Value=ADOTable1id_sklada->Value;
Form9->ADOTable2cena->Value=ADOTable2cena->Value;
Form9->ADOTable2kolvo->Value=ADOTable2kolvo->Value;
Form9->ADOTable2nds->Value=ADOTable2nds->Value;
Form9->ADOTable2id_gp->Value=ADOTable2id_gp->Value;
Form9->ADOTable2->Post();
}
void __fastcall TForm8::Button3Click(TObject *Sender)
{
Form23->ShowModal();
}
void __fastcall TForm8::FormActivate(TObject *Sender)
{
ADOTable1->Active=False;
ADOTable1->Active=true;
ADOTable2->Active=False;
ADOTable2->Active=true;
}
void __fastcall TForm8::Button2Click(TObject *Sender)
{
if (ADOTable1->RecordCount>0)
ADOTable1->Delete();
}
void __fastcall TForm8::Button4Click(TObject *Sender)
{
if (ADOTable2->RecordCount>0)
ADOTable2->Delete();
}
void __fastcall TForm8::ADOTable1AfterPost(TDataSet *DataSet)
{
Form9->ADOTable1->Insert();
Form9->ADOTable1data->Value=Form8->ADOTable1data_ttn->Value;
Form9->ADOTable1id_sklada->Value=Form8->ADOTable1id_sklada->Value;
Form9->ADOTable1unp_pokup->Value=Form8->ADOTable1unp_pokup->Value;
Form9->ADOTable1->Post();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit9.h"
#include "Unit1.h"
#include "Unit8.h"
#include "Unit10.h"
#include "Unit11.h"
#include "Unit12.h"
#include "Unit13.h"
#include "Unit14.h"
#include "Unit15.h"
#include "Unit16.h"
#include "Unit17.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit6.h"
#include "Unit7.h"
#include "Unit21.h"
#include "Unit22.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm9 *Form9;
__fastcall TForm9::TForm9(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm9::Button1Click(TObject *Sender)
{
Form21->ShowModal();
}
void __fastcall TForm9::ADOTable2AfterPost(TDataSet *DataSet)
{
Form11->ADOTable2->Edit();
Form11->ADOTable2kolvo->Value -=ADOTable2kolvo->Value;
Form11->ADOTable2->Post();
}
void __fastcall TForm9::Button3Click(TObject *Sender)
{
Form22->ShowModal();
}
void __fastcall TForm9::FormActivate(TObject *Sender)
{
ADOTable1->Active=False;
ADOTable1->Active=true;
ADOTable2->Active=False;
ADOTable2->Active=true;
}
void __fastcall TForm9::Button2Click(TObject *Sender)
{
if (ADOTable1->RecordCount>0)
ADOTable1->Delete();
}
void __fastcall TForm9::Button4Click(TObject *Sender)
{
if (ADOTable2->RecordCount>0)
ADOTable2->Delete();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit10.h"
#include "Unit1.h"
#include "Unit2.h"
#include "Unit5.h"
#include "Unit6.h"
#include "Unit18.h"
#include "Unit19.h"
#include "Unit11.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm10 *Form10;
__fastcall TForm10::TForm10(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm10::ADOTable2CalcFields(TDataSet *DataSet)
{
ADOTable2stoim->Value=(ADOTable2kolvo->Value*ADOTable2cena->Value)+((ADOTable2kolvo->Value*ADOTable2cena->Value)*ADOTable2nds->Value)/100;
}
void __fastcall TForm10::Button1Click(TObject *Sender)
{
Form18->ShowModal();
}
void __fastcall TForm10::Button3Click(TObject *Sender)
{
Form19->ShowModal();
}
void __fastcall TForm10::ADOTable2AfterPost(TDataSet *DataSet)
{
if (Form11->ADOTable1->Locate("id_sklada", ADOTable2id_sklad->Value, TLocateOptions()))
{
tbl1->Active=false;
tbl1->Active=true;
tbl1->Filtered=false;
tbl1->Filter="id_ost='"+Form11->ADOTable1id_ost->AsString+"' and id_gp='"+ADOTable2id_gp->Value+"' and cena='"+ADOTable2cena->Value+"'";
tbl1->Filtered=true;
if (tbl1->RecordCount>0)
{
tbl1->Edit();
tbl1kolvo->Value=tbl1kolvo->Value/2+tbl1kolvo->Value/2;
int k=ADOTable2kolvo->Value;
tbl1kolvo->Value=tbl1kolvo->Value+k;
tbl1cena->Value=ADOTable2cena->Value;
tbl1nds->Value=ADOTable2nds->Value;
tbl1->Post(); }
else {
tbl1->Insert();
tbl1id_ost->Value=Form11->ADOTable1id_ost->Value;
tbl1id_gp->Value=ADOTable2id_gp->Value;
tbl1kolvo->Value=ADOTable2kolvo->Value;
tbl1cena->Value=ADOTable2cena->Value;
tbl1nds->Value=ADOTable2nds->Value;
tbl1->Post();
} }
tbl1->Filtered=false;
}
void __fastcall TForm10::FormActivate(TObject *Sender)
{
ADOTable1->Active=False;
ADOTable1->Active=true;
ADOTable2->Active=False;
ADOTable2->Active=true;
Form10->ADOTable1->Filtered=false;
Form10->ADOTable1->Filter="show like 1";
Form10->ADOTable1->Filtered=true;
}
void __fastcall TForm10::Button2Click(TObject *Sender)
{
if (ADOTable1->RecordCount>0)
ADOTable1->Delete();
}
void __fastcall TForm10::Button4Click(TObject *Sender)
{
if (ADOTable2->RecordCount>0)
ADOTable2->Delete();
}
void __fastcall TForm10::ADOTable1AfterPost(TDataSet *DataSet)
{
if (!Form11->ADOTable1->Locate("id_sklada", ADOTable1id_sklada->Value, TLocateOptions())) {
Form11->ADOTable1->Insert();
Form11->ADOTable1id_sklada->Value=ADOTable1id_sklada->Value;
Form11->ADOTable1->Post();
}
}
#include <vcl.h>
#pragma hdrstop
#include "Unit11.h"
#include "Unit1.h"
#include "Unit6.h"
#include "Unit2.h"
#include "Unit24.h"
#include "Unit25.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm11 *Form11;
__fastcall TForm11::TForm11(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm11::Button1Click(TObject *Sender)
{
Form24->ShowModal();
}
void __fastcall TForm11::ADOTable2CalcFields(TDataSet *DataSet)
{
ADOTable2stoim->Value=(ADOTable2kolvo->Value*ADOTable2cena->Value)+((ADOTable2kolvo->Value*ADOTable2cena->Value)*ADOTable2nds->Value)/100;
}
void __fastcall TForm11::Button3Click(TObject *Sender)
{
Form25->ShowModal();
}
void __fastcall TForm11::FormActivate(TObject *Sender)
{
ADOTable1->Active=False;
ADOTable1->Active=true;
ADOTable2->Active=False;
ADOTable2->Active=true;
}
void __fastcall TForm11::Button2Click(TObject *Sender)
{
if (ADOTable1->RecordCount>0)
ADOTable1->Delete();
}
void __fastcall TForm11::Button4Click(TObject *Sender)
{
if (ADOTable2->RecordCount>0)
ADOTable2->Delete();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit12.h"
#include "Unit1.h"
#include "Unit2.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit6.h"
#include "Unit7.h"
#include "Unit8.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm12 *Form12;
__fastcall TForm12::TForm12(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm12::FormActivate(TObject *Sender)
{
Form2->ADOTable1->Insert();
Button1->Enabled=true;
Button2->Enabled=true;
}
void __fastcall TForm12::Button1Click(TObject *Sender)
{
if ((DBEdit1->Text!="") && (DBLookupComboBox1->Text!="")) {
Form2->ADOTable1->Post();
}
else {
Application->MessageBoxA("Заполните необходимые поля!","Ошибка!");
if (DBEdit1->Text=="")
DBEdit1->Color=clRed;
else DBLookupComboBox1->Color=clRed;
}
Form2->ADOTable1->First();
while(!Form2->ADOTable1->Eof) {
Form7->ADOTable1->Locate("id_ed_izm", Form2->ADOTable1id_ed_izm->Value, TLocateOptions());
Form2->ADOTable1->Edit();
Form2->ADOTable1ed_izm->AsString=Form7->ADOTable1ed_izm->AsString;
Form2->ADOTable1->Post();
Form2->ADOTable1->Next();
}
Form12->Close();
}
void __fastcall TForm12::Button2Click(TObject *Sender)
{
Form2->ADOTable1->Cancel();
Form12->Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit13.h"
#include "Unit1.h"
#include "Unit12.h"
#include "Unit2.h"
#include "Unit3.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm13 *Form13;
__fastcall TForm13::TForm13(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm13::FormActivate(TObject *Sender)
{
Form3->ADOTable1->Insert();
}
void __fastcall TForm13::Button2Click(TObject *Sender)
{
Form3->ADOTable1->Cancel();
Form13->Close();
}
void __fastcall TForm13::Button1Click(TObject *Sender)
{
if ((DBEdit1->Text!="") && (DBEdit2->Text!="") &&
(DBEdit3->Text!="") && (DBEdit4->Text!="")) {
Form3->ADOTable1->Post();
}
else {
Application->MessageBoxA("Заполните необходимые поля!","Ошибка!");
if (DBEdit1->Text=="") DBEdit1->Color=clRed;
else if (DBEdit2->Text=="") DBEdit2->Color=clRed;
else if (DBEdit3->Text=="") DBEdit3->Color=clRed;
else DBEdit4->Color=clRed;
}
}
#include <vcl.h>
#pragma hdrstop
#include "Unit14.h"
#include "Unit1.h"
#include "Unit12.h"
#include "Unit13.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm14 *Form14;
__fastcall TForm14::TForm14(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm14::Button2Click(TObject *Sender)
{
Form4->ADOTable1->Cancel();
Form14->Close();
}
void __fastcall TForm14::Button1Click(TObject *Sender)
{
if ((DBEdit1->Text!="") && (DBEdit2->Text!="") && (DBEdit3->Text!=""))
{
Form4->ADOTable1->Post();
}
else {
Application->MessageBoxA("Заполните необходимые поля!","Ошибка!");
if (DBEdit1->Text=="")
DBEdit1->Color=clRed;
else
if (DBEdit2->Text=="")
DBEdit2->Color=clRed;
else
DBEdit3->Color=clRed;
}
Form14->Close();
}
void __fastcall TForm14::FormActivate(TObject *Sender)
{
Form4->ADOTable1->Insert();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit15.h"
#include "Unit1.h"
#include "Unit12.h"
#include "Unit13.h"
#include "Unit14.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit5.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm15 *Form15;
__fastcall TForm15::TForm15(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm15::FormActivate(TObject *Sender)
{
Form5->ADOTable1->Insert();
}
void __fastcall TForm15::Button2Click(TObject *Sender)
{
Form5->ADOTable1->Cancel();
Form15->Close();
}
void __fastcall TForm15::Button1Click(TObject *Sender)
{
if ((DBEdit1->Text!="") && (DBEdit2->Text!="")) {
Form5->ADOTable1->Post();
}
else {
Application->MessageBoxA("Заполните необходимые поля!","Ошибка!");
if (DBEdit1->Text=="")
DBEdit1->Color=clRed;
else DBEdit2->Color=clRed;
}
Form12->Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit16.h"
#include "Unit1.h"
#include "Unit12.h"
#include "Unit13.h"
#include "Unit14.h"
#include "Unit15.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit6.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm16 *Form16;
__fastcall TForm16::TForm16(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm16::Button1Click(TObject *Sender)
{
Form6->ADOTable1->Post();
Close();
}
void __fastcall TForm16::Button2Click(TObject *Sender)
{
Form6->ADOTable1->Cancel();
Close();
}
void __fastcall TForm16::FormActivate(TObject *Sender)
{
Form6->ADOTable1->Insert();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit17.h"
#include "Unit1.h"
#include "Unit12.h"
#include "Unit13.h"
#include "Unit14.h"
#include "Unit15.h"
#include "Unit16.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit6.h"
#include "Unit7.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm17 *Form17;
__fastcall TForm17::TForm17(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm17::FormActivate(TObject *Sender)
{
Form7->ADOTable1->Insert();
}
void __fastcall TForm17::Button2Click(TObject *Sender)
{
Form7->ADOTable1->Cancel();
Form17->Close();
}
void __fastcall TForm17::Button1Click(TObject *Sender)
{
Form7->ADOTable1->Post();
Form17->Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit18.h"
#include "Unit10.h"
#include "Unit11.h"
#include "Unit6.h"
#include "Unit5.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm18 *Form18;
__fastcall TForm18::TForm18(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm18::FormActivate(TObject *Sender)
{
Form10->ADOTable1->Insert();
}
void __fastcall TForm18::btn2Click(TObject *Sender)
{
Form10->ADOTable1->Cancel();
Close();
}
void __fastcall TForm18::btn1Click(TObject *Sender)
{
Form10->ADOTable1show->Value=1;
Form10->ADOTable1data_prihoda->Value=FormatDateTime("dd.mm.yyyy",dtp1->Date);
Form10->ADOTable1->Post();
Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit19.h"
#include "Unit10.h"
#include "Unit11.h"
#include "Unit2.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm19 *Form19;
__fastcall TForm19::TForm19(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm19::FormActivate(TObject *Sender)
{
Form10->ADOTable2->Insert();
}
void __fastcall TForm19::btn1Click(TObject *Sender)
{
Form10->ADOTable2show->Value=1;
Form10->ADOTable2id_sklad->Value=Form10->ADOTable1id_sklada->Value;
Form10->ADOTable2data->Value=Form10->ADOTable1data_prihoda->Value;
Form10->ADOTable2->Post();
Close();
}
void __fastcall TForm19::btn2Click(TObject *Sender)
{
Form10->ADOTable2->Cancel();
Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit20.h"
#include "Unit8.h"
#include "Unit6.h"
#include "Unit11.h"
#include "Unit3.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm20 *Form20;
__fastcall TForm20::TForm20(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm20::FormActivate(TObject *Sender)
{
Form8->ADOTable1->Insert();
}
void __fastcall TForm20::btn1Click(TObject *Sender)
{
Form8->ADOTable1data_ttn->Value=FormatDateTime("dd.mm.yyyy",dtp1->Date);
Form8->ADOTable1->Post();
Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit21.h"
#include "Unit9.h"
#include "Unit3.h"
#include "Unit6.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm21 *Form21;
__fastcall TForm21::TForm21(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm21::btn1Click(TObject *Sender)
{
Form9->ADOTable1data->Value=FormatDateTime("dd.mm.yyyy", dtp1->Date);
Form9->ADOTable1->Post();
Close();
}
void __fastcall TForm21::btn2Click(TObject *Sender)
{
Form9->ADOTable1->Cancel();
Close();
}
void __fastcall TForm21::FormActivate(TObject *Sender)
{
Form9->ADOTable1->Insert();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit22.h"
#include "Unit2.h"
#include "Unit9.h"
#include "Unit11.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm22 *Form22;
__fastcall TForm22::TForm22(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm22::FormActivate(TObject *Sender)
{
Form9->ADOTable2->Insert();
}
void __fastcall TForm22::btn1Click(TObject *Sender)
{
Form9->ADOTable2data->Value=Form9->ADOTable1data->Value;
Form9->ADOTable2id_sklada->Value=Form9->ADOTable1id_sklada->Value;
Form9->ADOTable2cena->Value= Form11->ADOTable2cena->Value;
Form9->ADOTable2nds->Value= Form11->ADOTable2nds->Value;
Form9->ADOTable2->Post();
Close();
}
void __fastcall TForm22::Button1Click(TObject *Sender)
{
Form9->ADOTable2->Cancel();
Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit23.h"
#include "Unit8.h"
#include "Unit2.h"
#include "Unit11.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm23 *Form23;
__fastcall TForm23::TForm23(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm23::btn1Click(TObject *Sender)
{
Form8->ADOTable2cena->Value=Form11->ADOTable2cena->Value;
Form8->ADOTable2nds->Value=Form11->ADOTable2nds->Value;
Form8->ADOTable2->Post();
Close();
}
void __fastcall TForm23::FormActivate(TObject *Sender)
{
Form8->ADOTable2->Insert();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit24.h"
#include "Unit11.h"
#include "Unit6.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm24 *Form24;
__fastcall TForm24::TForm24(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm24::FormActivate(TObject *Sender)
{
Form11->ADOTable1->Insert();
}
void __fastcall TForm24::Button1Click(TObject *Sender)
{
Form11->ADOTable1->Post();
Close();
}
void __fastcall TForm24::Button2Click(TObject *Sender)
{
Form11->ADOTable1->Cancel();
Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit25.h"
#include "Unit11.h"
#include "Unit2.h"
#include "Unit10.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm25 *Form25;
__fastcall TForm25::TForm25(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm25::FormActivate(TObject *Sender)
{
Form11->ADOTable2->Insert();
}
void __fastcall TForm25::btn1Click(TObject *Sender)
{
Form11->ADOTable2->Post();
Close();
}
void __fastcall TForm25::btn2Click(TObject *Sender)
{
Form11->ADOTable2->Cancel();
Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit26.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm26 *Form26;
__fastcall TForm26::TForm26(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm26::RadioButton1Click(TObject *Sender)
{
DateTimePicker2->Enabled=false;
}
void __fastcall TForm26::RadioButton2Click(TObject *Sender)
{
DateTimePicker2->Enabled=true;
}
void __fastcall TForm26::Button2Click(TObject *Sender)
{
Close();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit27.h"
#include "Unit28.h"
#include "Unit1.h"
#include "Unit11.h"
#include "Unit6.h"
#include "Unit2.h"
#include "Unit7.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm27 *Form27;
__fastcall TForm27::TForm27(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm27::Button2Click(TObject *Sender)
{
Close();
}
void __fastcall TForm27::FormActivate(TObject *Sender)
{
ADOTable1->Active=false;
ADOTable1->Active=true;
}
void __fastcall TForm27::Button1Click(TObject *Sender)
{
Form28->QuickRep5->Preview();
}
#include <vcl.h>
#pragma hdrstop
#include "Unit28.h"
#include "Unit27.h"
#include "Unit29.h"
#include "Unit30.h"
#include "Unit31.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm28 *Form28;
__fastcall TForm28::TForm28(TComponent* Owner)
: TForm(Owner)
{
}
#include <vcl.h>
#pragma hdrstop
#include "Unit29.h"
#include "Unit28.h"
#include "Unit1.h"
#include "Unit7.h"
#include "Unit2.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm29 *Form29;
__fastcall TForm29::TForm29(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm29::Button1Click(TObject *Sender)
{
new_query->SQL->Text="create table mati (id counter primary key, id_gp int, kolvo int, id_sklad int, id_ost int, cena int, nds int, foreign key(id_ost) references ostatki)";
new_query->ExecSQL();
new_query->SQL->Text="select * from mati";
new_query->Active=true;
for (int i=0; i=new_query->RecordCount;i++)
new_query->Delete();
mat_p->Close();
mat_p->SQL->Clear();
if (rb1->Checked) {
mat_p->SQL->Text="select id_prihoda, id_gp, sum(kolvo) as summ, id_sklad, cena, nds from gp_p where data <= :D and show not like 0 group by id_prihoda, id_gp, id_sklad, cena, nds";
mat_p->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp5->Date); }
else {
mat_p->SQL->Text="select id_prihoda, id_gp, sum(kolvo) as summ, id_sklad, cena, nds from gp_p where data between :D and :DD and show not like 0 group by id_prihoda, id_gp, id_sklad, cena, nds";
mat_p->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp5->Date);
mat_p->Parameters->ParamByName("DD")->Value = FormatDateTime("dd.mm.yyyy",dtp6->Date);
}
mat_p->Open();
mat_p->First();
if (mat_p->RecordCount>0)
for (int i=0; i<mat_p->RecordCount; i++) {
new_query->Insert();
new_query->FieldByName("id_gp")->Value=mat_p->FieldByName("id_gp")->Value;
new_query->FieldByName("kolvo")->Value=mat_p->FieldByName("summ")->Value;
new_query->FieldByName("id_sklad")->Value=mat_p->FieldByName("id_sklad")->Value;
new_query->FieldByName("cena")->Value=mat_p->FieldByName("cena")->Value;
new_query->FieldByName("nds")->Value=mat_p->FieldByName("nds")->Value;
new_query->Post(); int sk=new_query->FieldByName("id_sklad")->Value;
ostatki->Filter="id_sklada like '"+IntToStr(sk)+"'";
ostatki->Filtered=True;
new_query->Edit();
new_query->FieldByName("id_ost")->Value=ostatki->FieldByName("id_ost")->Value;
new_query->Post();
ostatki->Filtered=false;
mat_p->Next();
}
tbl1->TableName="mati";
tbl1->Active=false;
tbl1->Active=true;
Form28->QuickRep9->Preview();
new_query->Active=false;
new_query->SQL->Text="drop table mati";
new_query->ExecSQL();
}
void __fastcall TForm29::tbl1CalcFields(TDataSet *DataSet)
{
tbl1stoim->Value=(tbl1kolvo->Value*tbl1cena->Value)+((tbl1kolvo->Value*tbl1cena->Value)*tbl1nds->Value)/100;
}
void __fastcall TForm29::rb1Click(TObject *Sender)
{
dtp6->Enabled=false;
}
void __fastcall TForm29::rb2Click(TObject *Sender)
{
dtp6->Enabled=true;
}
void __fastcall TForm29::Button2Click(TObject *Sender)
{
Close();
}
void __fastcall TForm29::FormActivate(TObject *Sender)
{
ostatki->Active=false;
ostatki->Active=true;
mat_p->Active=false;
mat_p->Active=true;
mat_s->Active=false;
mat_s->Active=true;
}
#include <vcl.h>
#pragma hdrstop
#include "Unit30.h"
#include "Unit28.h"
#include "Unit7.h"
#include "Unit1.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm30 *Form30;
__fastcall TForm30::TForm30(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm30::Button1Click(TObject *Sender)
{
new_query->SQL->Text="create table mati (id counter primary key, id_gp int, kolvo int, id_sklad int, id_ost int, cena int, nds int, foreign key(id_ost) references ostatki)";
new_query->ExecSQL();
new_query->SQL->Text="select * from mati";
new_query->Active=true;
for (int i=0; i=new_query->RecordCount;i++)
new_query->Delete();
mat_s->Close();
mat_s->SQL->Clear();
if (rb7->Checked) {
mat_s->SQL->Text="select id_rashoda, id_gp, sum(kolvo) as summ, id_sklada, cena, nds from gp_r where data <= :D group by id_rashoda, id_gp, id_sklada, cena, nds";
mat_s->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp9->Date); }
else {
mat_s->SQL->Text="select id_rashoda, id_gp, sum(kolvo) as summ, id_sklada, cena, nds from gp_r where data between :D and :DD group by id_rashoda, id_gp, id_sklada, cena, nds";
mat_s->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp9->Date);
mat_s->Parameters->ParamByName("DD")->Value = FormatDateTime("dd.mm.yyyy",dtp10->Date);
}
mat_s->Open();
mat_s->First();
if (mat_s->RecordCount>0)
for (int i=0; i<mat_s->RecordCount; i++) {
new_query->Insert();
new_query->FieldByName("id_gp")->Value=mat_s->FieldByName("id_gp")->Value;
new_query->FieldByName("kolvo")->Value=mat_s->FieldByName("summ")->Value;
new_query->FieldByName("id_sklad")->Value=mat_s->FieldByName("id_sklada")->Value;
new_query->FieldByName("cena")->Value=mat_s->FieldByName("cena")->Value;
new_query->FieldByName("nds")->Value=mat_s->FieldByName("nds")->Value;
new_query->Post(); int sk=new_query->FieldByName("id_sklad")->Value;
ostatki->Filter="id_sklada like '"+IntToStr(sk)+"'";
ostatki->Filtered=True;
new_query->Edit();
new_query->FieldByName("id_ost")->Value=ostatki->FieldByName("id_ost")->Value;
new_query->Post();
ostatki->Filtered=false;
mat_s->Next();
}
tbl1->TableName="mati";
tbl1->Active=false;
tbl1->Active=true;
Form28->QuickRep11->Preview();
new_query->Active=false;
new_query->SQL->Text="drop table mati";
new_query->ExecSQL();
}
void __fastcall TForm30::Button2Click(TObject *Sender)
{
Close();
}
void __fastcall TForm30::tbl1CalcFields(TDataSet *DataSet)
{
tbl1stoim->Value=(tbl1kolvo->Value*tbl1cena->Value)+((tbl1kolvo->Value*tbl1cena->Value)*tbl1nds->Value)/100;
}
void __fastcall TForm30::rb7Click(TObject *Sender)
{
dtp10->Enabled=false;
}
void __fastcall TForm30::rb8Click(TObject *Sender)
{
dtp10->Enabled=true;
}
void __fastcall TForm30::FormActivate(TObject *Sender)
{
ostatki->Active=false;
ostatki->Active=true;
mat_p->Active=false;
mat_p->Active=true;
mat_s->Active=false;
mat_s->Active=true;
}
#include <vcl.h>
#pragma hdrstop
#include "Unit31.h"
#include "Unit28.h"
#include "Unit7.h"
#include "Unit1.h"
#include "Unit2.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm31 *Form31;
__fastcall TForm31::TForm31(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm31::Button1Click(TObject *Sender)
{
qry9->SQL->Text="create table osv (id counter primary key, id_gp int, id_sklad int, n_ost int, prih int, rash int, ost int, id_ost int, cena int, nds int, foreign key(id_ost) references ostatki)";
qry9->ExecSQL();
qry9->SQL->Clear();
qry9->SQL->Text="select * from osv";
qry9->Active=true;
mat_p->Close();
mat_p->SQL->Clear();
if (rb3->Checked) {
mat_p->SQL->Text="select id_prihoda, id_gp, sum(kolvo) as summ, id_sklad, cena, nds from gp_p where data <= :D and show=0 group by id_prihoda, id_gp, id_sklad, cena, nds order by id_sklad";
mat_p->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp4->Date); }
else {
mat_p->SQL->Text="select id_prihoda, id_gp, sum(kolvo) as summ, id_sklad, cena from gp_p where data between :D and :DD and show=0 group by id_prihoda, id_gp, id_sklad, cena, nds order by id_sklad";
mat_p->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp4->Date);
mat_p->Parameters->ParamByName("DD")->Value = FormatDateTime("dd.mm.yyyy",dtp7->Date);
}
mat_p->Open();
mat_p->First();
for (int i=0; i<mat_p->RecordCount; i++) {
qry9->Insert();
qry9id_gp->Value=mat_p->FieldByName("id_gp")->Value;
qry9id_sklad->Value=mat_p->FieldByName("id_sklad")->Value;
qry9n_ost->Value=mat_p->FieldByName("summ")->Value;
qry9cena->Value=mat_p->FieldByName("cena")->Value;
qry9nds->Value=mat_p->FieldByName("nds")->Value;
qry9->Post();
int sk=qry9->FieldByName("id_sklad")->Value;
ostatki->Filter="id_sklada like '"+IntToStr(sk)+"'";
ostatki->Filtered=True;
qry9->Edit();
qry9->FieldByName("id_ost")->Value=ostatki->FieldByName("id_ost")->Value;
qry9->Post();
ostatki->Filtered=false;
mat_p->Next();
}
mat_p->Close();
mat_p->SQL->Clear();
if (rb3->Checked) {
mat_p->SQL->Text="select id_prihoda, id_gp, sum(kolvo) as summ, id_sklad, cena, nds from gp_p where (data <= :D) and show not like 0 group by id_prihoda, id_gp, id_sklad, cena, nds order by id_sklad";
mat_p->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp4->Date);
}
else {
mat_p->SQL->Text="select id_prihoda, id_gp, sum(kolvo) as summ, id_sklad, cena, nds from gp_p where (data between :D and :DD) and show not like 0 group by id_prihoda, id_gp, id_sklad, cena, nds order by id_sklad";
mat_p->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp4->Date);
mat_p->Parameters->ParamByName("DD")->Value = FormatDateTime("dd.mm.yyyy",dtp7->Date);
}
mat_p->Open();
mat_p->First();
for (int i=0; i<mat_p->RecordCount; i++) {
qry9->Filter="id_sklad like '"+mat_p->FieldByName("id_sklad")->AsString+"' and id_gp like '"+mat_p->FieldByName("id_gp")->AsString+"'";
qry9->Filtered=true;
if (qry9->RecordCount==0) {
qry9->Filtered=false;
qry9->Insert();
qry9id_gp->Value=mat_p->FieldByName("id_gp")->Value;
qry9id_sklad->Value=mat_p->FieldByName("id_sklad")->Value;
qry9cena->Value=mat_p->FieldByName("cena")->Value;
qry9nds->Value=mat_p->FieldByName("nds")->Value;
qry9prih->Value=mat_p->FieldByName("summ")->Value;
qry9->Post();
int sk=qry9->FieldByName("id_sklad")->Value;
ostatki->Filter="id_sklada like '"+IntToStr(sk)+"'";
ostatki->Filtered=True;
qry9->Edit();
qry9->FieldByName("id_ost")->Value=ostatki->FieldByName("id_ost")->Value;
qry9->Post();
ostatki->Filtered=false; }
else if (qry9->RecordCount>0) if (qry9->Locate("cena", mat_p->FieldByName("cena")->Value, TLocateOptions())) {
qry9->Edit(); int k=0; k=qry9prih->Value + mat_p->FieldByName("summ")->Value;
qry9prih->Value=k;
qry9->Post();
qry9->Filtered=false;
}
else {
qry9->Filtered=false;
qry9->Insert();
qry9id_gp->Value=mat_p->FieldByName("id_gp")->Value;
qry9id_sklad->Value=mat_p->FieldByName("id_sklad")->Value;
qry9cena->Value=mat_p->FieldByName("cena")->Value;
qry9nds->Value=mat_p->FieldByName("nds")->Value;
qry9prih->Value=mat_p->FieldByName("summ")->Value;
qry9->Post();
int sk=qry9->FieldByName("id_sklad")->Value;
ostatki->Filter="id_sklada like '"+IntToStr(sk)+"'";
ostatki->Filtered=True;
qry9->Edit();
qry9->FieldByName("id_ost")->Value=ostatki->FieldByName("id_ost")->Value;
qry9->Post();
ostatki->Filtered=false;
}
mat_p->Next();
}
mat_s->SQL->Clear();
if (rb3->Checked) {
mat_s->SQL->Text="select id_rashoda, id_gp, sum(kolvo) as summ, id_sklada, cena, nds from gp_r where data <= :D group by id_rashoda, id_gp, id_sklada, cena, nds";
mat_s->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp4->Date); }
else {
mat_s->SQL->Text="select id_rashoda, id_gp, sum(kolvo) as summ, id_sklada, cena, nds from gp_r where data between :D and :DD group by id_rashoda, id_gp, id_sklada, cena, nds";
mat_s->Parameters->ParamByName("D")->Value = FormatDateTime("dd.mm.yyyy",dtp4->Date);
mat_s->Parameters->ParamByName("DD")->Value = FormatDateTime("dd.mm.yyyy",dtp7->Date);
}
mat_s->Active=true;
mat_s->First();
for (int i=0; i<mat_s->RecordCount; i++) {
qry9->Filter="id_gp like '"+mat_s->FieldByName("id_gp")->AsString+"' and id_sklad like '"+mat_s->FieldByName("id_sklada")->AsString+"'";
qry9->Filtered=true;
if (qry9->RecordCount==0) {
qry9->Filtered=false;
qry9->Insert();
qry9id_gp->Value=mat_s->FieldByName("id_gp")->Value;
qry9id_sklad->Value=mat_s->FieldByName("id_sklada")->Value;
qry9rash->Value=mat_s->FieldByName("summ")->Value;
qry9->Post();
int sk=qry9->FieldByName("id_sklad")->Value;
ostatki->Filter="id_sklada like '"+IntToStr(sk)+"'";
ostatki->Filtered=True;
qry9->Edit();
qry9->FieldByName("id_ost")->Value=ostatki->FieldByName("id_ost")->Value;
qry9->Post();
ostatki->Filtered=false; }
else if (qry9->Locate("cena", mat_s->FieldByName("cena")->Value, TLocateOptions())) {
qry9->Edit();
qry9rash->Value=mat_s->FieldByName("summ")->Value;
qry9->Post();
qry9->Filtered=false;
}
mat_s->Next();
}
qry9->First();
for (int i=0; i<qry9->RecordCount; i++) {
qry9->Edit();
if (qry9n_ost->AsString=="") qry9n_ost->Value=0;
if (qry9prih->AsString=="") qry9prih->Value=0;
if (qry9rash->AsString=="") qry9rash->Value=0;
qry9ost->Value=qry9n_ost->Value + qry9prih->Value - qry9rash->Value;
qry9->Post();
qry9->Next(); }
tbl3->TableName="osv";
tbl3->Active=false;
tbl3->Active=true;
Form28->QuickRep10->Preview();
new_query->SQL->Text="drop table osv";
new_query->ExecSQL();
tbl3->Active=false;
}
void __fastcall TForm31::Button2Click(TObject *Sender)
{
Close();
}
void __fastcall TForm31::tbl3CalcFields(TDataSet *DataSet)
{
tbl3stoim->Value=(tbl3ost->Value*tbl3cena->Value)+((tbl3ost->Value*tbl3cena->Value)*tbl3nds->Value)/100;
}
void __fastcall TForm31::rb3Click(TObject *Sender)
{
dtp7->Enabled=false;
}
void __fastcall TForm31::rb4Click(TObject *Sender)
{
dtp7->Enabled=true;
}
void __fastcall TForm31::FormActivate(TObject *Sender)
{
ostatki->Active=false;
ostatki->Active=true;
mat_p->Active=false;
mat_p->Active=true;
mat_s->Active=false;
mat_s->Active=true;
}
Приложение Б
Информационная модель
Размещено на http://www.allbest.ru/
Размещено на http://www.allbest.ru/
Размещено на Allbest.ru
Подобные документы
Методика создания базы данных (БД) "Учет готовой продукции на складе". Порядок разработки пользовательского приложения (информационной системы) на основе БД. Перечень и общая характеристика документов, необходимых для учета готовой продукции на складе.
курсовая работа [2,4 M], добавлен 06.09.2010Необходимая документация при учете готовой продукции на складе ООО "Перекрёсток". Проектирование базы данных на основе нормализации. Схема данных и связи между таблицами в проектируемой базе данных. Обеспечение безопасности и целостности базы данных.
дипломная работа [2,9 M], добавлен 15.01.2012Изучение особенностей документального оформления готовой продукции, выпущенной из производства. Разработка информационной системы учета готовой продукции. Схема взаимодействия входной и выходной информации. Создание инструкции по работе пользователя.
курсовая работа [1,3 M], добавлен 05.07.2015Разработка программного обеспечения, позволяющего вести автоматизированный учет продукции на складе. Требования к техническому и программному обеспечению. Методика разработки проекта, описание алгоритма, структурная схема, тестирование и отладка.
дипломная работа [1,5 M], добавлен 19.07.2014Проектирование автоматизированной информационной системы, осуществляющей учет готовой продукции. База осуществляет редактирование данных о сотрудниках, заказчиках, заказах, ведение статистики. Разработка клиентского приложения в СУБД MS Access 2007.
курсовая работа [2,2 M], добавлен 15.08.2010Анализ деятельности складского учета, внедрение информационных технологий в процесс работы склада. Создание информационной системы учета движения материалов на складе. Моделирование бизнес-процессов. Проектирование физической структуры базы данных.
курсовая работа [4,1 M], добавлен 22.06.2014История создания предприятия и анализ его деятельности. Основные понятия торговли. Этапы разработки модели данных, построение информационно-логической модели. Разработка базы данных для учета товародвижения и документооборота на предприятии в ACCESS.
дипломная работа [1006,2 K], добавлен 14.01.2012Общая характеристика и организационная структура ОАО "Каравай". Комплексное проектирование автоматизированной системы учета готовой продукции для исследуемой организации в программной среде Borland Delphi 9.0. Оценка экономической эффективности проекта.
курсовая работа [1,9 M], добавлен 14.09.2012База данных как компьютеризованная система, предназначенная для хранения информации и предоставления ее по требованию. Описание предметной области для проектирования и организации базы учета данных готовой продукции и сопровождения ее программой.
дипломная работа [1,0 M], добавлен 19.05.2011Разработка автоматизированной системы "Учет нематериальных активов" для оприходования готовой продукции на склад по плановой себестоимости. Определение задач (заполнение приходного ордера, вывод данных на печать) и требований к обеспечению программы.
курсовая работа [1,0 M], добавлен 06.09.2010