?? rkb.cpp
字號:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "rkb.h"
#include "zu.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm4 *Form4;
int zjs=0;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit1KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48&&Key<59)
ComboBox1->Enabled=true;
if(Key==13){
// zjs=zjs+Edit1->Text.ToIntDef(0);
// Label30->Caption=zjs;
;//Form4->ActiveControl=ComboBox1;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Button3Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit2KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48&&Key<59)
ComboBox2->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox2;
// zjs=zjs+Edit2->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit3KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48&&Key<59)
ComboBox3->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox3;
// zjs=zjs+Edit3->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit4KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox4->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox4;
// zjs=zjs+Edit4->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit5KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox5->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox5;
// zjs=zjs+Edit5->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit8KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox8->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox8;
// zjs=zjs+Edit8->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit10KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox10->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox10;
// zjs=zjs+Edit10->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit11KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox11->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox11;
// zjs=zjs+Edit11->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit12KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox12->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox12;
// zjs=zjs+Edit12->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit13KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox13->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox13;
// zjs=zjs+Edit13->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit14KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox14->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox14;
// zjs=zjs+Edit14->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit15KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox15->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox15;
// zjs=zjs+Edit15->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit16KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox16->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox16;
// zjs=zjs+Edit16->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit17KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox17->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox17;
// zjs=zjs+Edit17->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit18KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox18->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox18;
// zjs=zjs+Edit18->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit19KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox19->Enabled=true;
if(Key==13){
// zjs=zjs+Edit19->Text.ToIntDef(0);
;//Form4->ActiveControl=ComboBox19;
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit20KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox20->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox20;
// zjs=zjs+Edit20->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit21KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox21->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox21;
// zjs=zjs+Edit21->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit22KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox22->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox22;
// zjs=zjs+Edit22->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit23KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox23->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox23;
// zjs=zjs+Edit23->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit24KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox24->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox24;
// zjs=zjs+Edit24->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::ComboBox1Exit(TObject *Sender)
{
if(!Table2->FindKey(ARRAYOFCONST((Label1->Caption))))
Table2->AppendRecord(ARRAYOFCONST((Label1->Caption,Edit1->Text.ToIntDef(0),ComboBox1->Text)));
else{
Table2->Edit();
Table2->FieldByName("TXM")->AsString=ComboBox1->Text;
Table2->FieldByName("KSS")->AsString=Edit1->Text.ToIntDef(0);
Table2->Post();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Button1Click(TObject *Sender)
{
Table1->Next();
INIT();
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Button2Click(TObject *Sender)
{
Form4->Table1->Prior();
INIT();
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit6KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox6->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox6;
// zjs=zjs+Edit1->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit7KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox7->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox7;
// zjs=zjs+Edit7->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit9KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key>48)
ComboBox9->Enabled=true;
if(Key==13){
;//Form4->ActiveControl=ComboBox9;
// zjs=zjs+Edit9->Text.ToIntDef(0);
// Label30->Caption=zjs;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::ComboBox2Exit(TObject *Sender)
{
if(!Table2->FindKey(ARRAYOFCONST((Label2->Caption))))
Table2->AppendRecord(ARRAYOFCONST((Label2->Caption,Edit2->Text.ToIntDef(0),ComboBox2->Text)));
else{
Table2->Edit();
Table2->FieldByName("TXM")->AsString=ComboBox2->Text;
Table2->FieldByName("KSS")->AsString=Edit2->Text.ToIntDef(0);
Table2->Post();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::ComboBox3Exit(TObject *Sender)
{
if(!Table2->FindKey(ARRAYOFCONST((Label3->Caption))))
Table2->AppendRecord(ARRAYOFCONST((Label3->Caption,Edit3->Text.ToIntDef(0),ComboBox3->Text)));
else{
Table2->Edit();
Table2->FieldByName("TXM")->AsString=ComboBox3->Text;
Table2->FieldByName("KSS")->AsString=Edit3->Text.ToIntDef(0);
Table2->Post();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit1Exit(TObject *Sender)
{
zjs=zjs+Edit1->Text.ToIntDef(0);
Label30->Caption=zjs;
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit1Click(TObject *Sender)
{
zjs=zjs-Edit1->Text.ToIntDef(0);
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit2Exit(TObject *Sender)
{
zjs=zjs+Edit2->Text.ToIntDef(0);
Label30->Caption=zjs;
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit2Click(TObject *Sender)
{
zjs=zjs-Edit2->Text.ToIntDef(0);
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit3Exit(TObject *Sender)
{
zjs=zjs+Edit3->Text.ToIntDef(0);
Label30->Caption=zjs;
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit4Exit(TObject *Sender)
{
zjs=zjs+Edit4->Text.ToIntDef(0);
Label30->Caption=zjs;
}
//---------------------------------------------------------------------------
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -