📄 qu_scmbd.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Qu_Scmbd.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "ListBaseForm"
#pragma link "fpanel"
#pragma link "SDEdit"
#pragma link "SDGrid"
#pragma resource "*.dfm"
TfrmQu_Scmbd *frmQu_Scmbd;
//---------------------------------------------------------------------------
__fastcall TfrmQu_Scmbd::TfrmQu_Scmbd(TComponent* Owner,AnsiString m_ScmbhCode)
: TListBaseForm(Owner)
{
m_FilterStr=""; //查询条件字串
m_SQL=""; //查询语句
seScmbhCode->Text=m_ScmbhCode;
}
//---------------------------------------------------------------------------void __fastcall TfrmQu_Scmbd::InitEditControl()
void __fastcall TfrmQu_Scmbd::InitEditControl()
{}
void __fastcall TfrmQu_Scmbd::GetDataFromComObject(int Section)
{}
void __fastcall TfrmQu_Scmbd::SendDataToComObject(int Section)
{}
void __fastcall TfrmQu_Scmbd::WaitUserInput(int Section)
{}
void __fastcall TfrmQu_Scmbd::DisplayBill()
{}
void __fastcall TfrmQu_Scmbd::GetBill(AnsiString BillID)
{}
void __fastcall TfrmQu_Scmbd::ChangeToBrowseState(bool Browse)
{}
//---------------------------------------------------------------------------
void __fastcall TfrmQu_Scmbd::FillGridWithData()
{
TComResultSet *RsQuery=NewResultSet();
AnsiString ItemStr="";
m_SQL=" select * from sdVW_Scmbd where ScmbdCODE='"+seScmbhCode->Text+"' order by ScmbdCODE";
sgScmbd->RowCount=1;
try
{
RsQuery->Open(m_SQL,"");
RsQuery->MoveFirst();
while( RsQuery->Eof == 0)
{
ItemStr="\t"+RsQuery->FieldByName("ScmbdLine")+
"\t"+RsQuery->FieldByName("ScmbdGoods")+
"\t"+RsQuery->FieldByName("GoodsName")+
"\t"+RsQuery->FieldByName("UnitName")+
"\t"+RsQuery->FieldByName("ScmbdOCost")+
"\t"+RsQuery->FieldByName("ScmbdNCost")+
"\t"+RsQuery->FieldByName("ScmbdDesc");
sgScmbd->AddItem(ItemStr);
RsQuery->MoveNext();
}
RsQuery->Close();
}
__finally
{
delete RsQuery;
}
}
//---------------------------------------------------------------------------
void __fastcall TfrmQu_Scmbd::FormShow(TObject *Sender)
{
FillGridWithData();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -