⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dayreport.cpp

📁 民航飞机生产管理系统,实现了飞机定检坚控,小时卡起落卡等的坚控,并能生成工作任务包
💻 CPP
📖 第 1 页 / 共 2 页
字号:
if(qiluo->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::jishenChange(TObject *Sender)
{
zuofa->Text=jishen->Text;
youfa->Text=jishen->Text;
if(jishen->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::BitBtnFirstClick(TObject *Sender)
{
DataModule1->dayreport->First();
ReadData();
SetSatus();
}
//---------------------------------------------------------------------------

void __fastcall TForm4::BitBtnPriorClick(TObject *Sender)
{
DataModule1->dayreport->Prior();
ReadData();
SetSatus();

}
//---------------------------------------------------------------------------

void __fastcall TForm4::BitBtnNextClick(TObject *Sender)
{
DataModule1->dayreport->Next();
ReadData();
SetSatus();

}
//---------------------------------------------------------------------------

void __fastcall TForm4::BitBtnEndClick(TObject *Sender)
{
DataModule1->dayreport->Last();
ReadData();
SetSatus();
}
//---------------------------------------------------------------------------


void TForm4::SetSatus()
{
   if(DataModule1->dayreport->Eof)
        {BitBtnEnd->Enabled=false;
         BitBtnNext->Enabled=false;}
         else
         {
         BitBtnEnd->Enabled=true;
         BitBtnNext->Enabled=true;
         }
   if(DataModule1->dayreport->Bof)
        {
                BitBtnFirst->Enabled=false;
                BitBtnPrior->Enabled=false;
        }
        else
        {
                BitBtnFirst->Enabled=true;
                BitBtnPrior->Enabled=true;
        }     //TODO: Add your source code here
}
void __fastcall TForm4::BitBtnEditClick(TObject *Sender)
{
editfg=1;
setwrite();
BitBtnAdd->Enabled=!DataModule1->dayrep->AutoEdit;
BitBtnCan->Enabled=true;
BitBtnEdit->Enabled=false;

if(!DataModule1->dayrep->AutoEdit)
{
        DataModule1->dayrep->AutoEdit=true;

}

BitBtnOk->Enabled=DataModule1->dayrep->AutoEdit;
}
//---------------------------------------------------------------------------

void __fastcall TForm4::BitBtnDelClick(TObject *Sender)
{
   if ( Application->MessageBox("删除后不可恢复,是否要删除?", "删除", MB_OKCANCEL) == IDOK)
{   DataModule1->dayreport->Delete();
ReadData();
setread();
}
}
//---------------------------------------------------------------------------

void __fastcall TForm4::BitBtnCanClick(TObject *Sender)
{
if((editfg==1)||(editfg==2))
{
        BitBtnOk->Enabled=false;
        ReadData();
        BitBtnCan->Enabled=false;
        BitBtnEdit->Enabled=true;
        BitBtnAdd->Enabled=true;
        editfg=0;
}
}
//---------------------------------------------------------------------------



void TForm4::setread()
{
   Date1->Enabled=false;
   ComboBox2->Enabled=false;
   jishen->ReadOnly=true;
    zuofa->ReadOnly=true;
    youfa->ReadOnly=true;
    jixiu->ReadOnly=true;
    youxiu->ReadOnly=true;
    zuoxiu->ReadOnly==true;
    qiluo->Enabled=false;
    qixiu->Enabled=false;
   youxun->Enabled=false;
   zuoxun->Enabled=false;
   apu->ReadOnly=true;
   ComboBox1->Enabled=false;
       //TODO: Add your source code here
}

void TForm4::setwrite()
{
         Date1->Enabled=true;
   ComboBox2->Enabled=true;
   jishen->ReadOnly=false;
    zuofa->ReadOnly=false;
    youfa->ReadOnly=false;
    jixiu->ReadOnly=false;
    youxiu->ReadOnly=false;
    zuoxiu->ReadOnly==false;
    qiluo->Enabled=true;
    qixiu->Enabled=true;
   youxun->Enabled=true;
   zuoxun->Enabled=true;
   apu->ReadOnly=false;
   ComboBox1->Enabled=true;
        //TODO: Add your source code here
}
void __fastcall TForm4::qixiuChange(TObject *Sender)
{
if(qixiu->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::jixiuChange(TObject *Sender)
{
if(jixiu->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::zuoxiuChange(TObject *Sender)
{
if(zuoxiu->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::zuoxunChange(TObject *Sender)
{
if(zuoxun->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::zuofaChange(TObject *Sender)
{
if(zuofa->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::youfaChange(TObject *Sender)
{
if(youfa->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::apuChange(TObject *Sender)
{
if(apu->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::youxunChange(TObject *Sender)
{
if(youxun->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::youxiuChange(TObject *Sender)
{
if(youxiu->Text.operator ==("")&&editfg==1)
ShowMessage("空值非法,必须是数值。");
}
//---------------------------------------------------------------------------

void __fastcall TForm4::FormClose(TObject *Sender, TCloseAction &Action)
{
//DataModule1->dayreport->SaveToFile(DataModule1->dayreport->FileName,dfBinary);
//DataModule1->dayreport->IndexFieldNames="";        
}
//---------------------------------------------------------------------------

void __fastcall TForm4::FormShow(TObject *Sender)
{
DataModule1->dayreport->IndexFieldNames="日期";
}
//---------------------------------------------------------------------------


void __fastcall TForm4::BitBtn1Click(TObject *Sender)
{
cxb2=DataModule1->dayreport;
FBcxtj2->ShowModal();
if(FBcxtj2->ModalResult==mrOk)
{
DataModule1->dayreport->Filter=FBcxtj2->tj->Caption;
DataModule1->dayreport->Filtered=true;
ReadData();
//SetSatus();
}


}
//---------------------------------------------------------------------------


void __fastcall TForm4::ComboBox1Change(TObject *Sender)
{
if(ComboBox1->Text.operator ==("训练"))
{
lianxuql->Visible=true;
Label15->Visible=true;
lianxuql->Text=qiluo->Text;
}
else
 {lianxuql->Visible=false;
Label15->Visible=false;
}

}
//---------------------------------------------------------------------------



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -