qu_apivd.cpp
来自「一个以前收集的基于C/S架构的ERP客户端源代码」· C++ 代码 · 共 79 行
CPP
79 行
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Qu_Apivd.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "ListBaseForm"
#pragma link "fpanel"
#pragma link "SDEdit"
#pragma link "SDGrid"
#pragma resource "*.dfm"
TfrmQu_Apivd *frmQu_Apivd;
//---------------------------------------------------------------------------
__fastcall TfrmQu_Apivd::TfrmQu_Apivd(TComponent* Owner,AnsiString m_code,AnsiString m_Supply)
: TListBaseForm(Owner)
{
seApivhCode->Text=m_code;
seApivhSupply->Text=m_Supply;
m_SQL=""; //查询语句
}
//---------------------------------------------------------------------------
void __fastcall TfrmQu_Apivd::InitEditControl()
{}
void __fastcall TfrmQu_Apivd::GetDataFromComObject(int Section)
{}
void __fastcall TfrmQu_Apivd::SendDataToComObject(int Section)
{}
void __fastcall TfrmQu_Apivd::WaitUserInput(int Section)
{}
void __fastcall TfrmQu_Apivd::DisplayBill()
{}
void __fastcall TfrmQu_Apivd::GetBill(AnsiString BillID)
{}
void __fastcall TfrmQu_Apivd::ChangeToBrowseState(bool Browse)
{}
//---------------------------------------------------------------------------
void __fastcall TfrmQu_Apivd::FillGridWithData()
{
TComResultSet *RsQuery=new TComResultSet(Handle,g_ClientHandle);
AnsiString ItemStr="";
m_SQL=" select * from sdVW_Apivd where ApivdCODE='"+seApivhCode->Text+"' order by ApivdCODE";
sgApivd->RowCount=1;
try
{
RsQuery->Open(m_SQL,"");
RsQuery->MoveFirst();
while( RsQuery->Eof == 0)
{
ItemStr="\t"+RsQuery->FieldByName("ApivdLine")+
"\t"+RsQuery->FieldByName("ApivdGoods")+
"\t"+RsQuery->FieldByName("ApivdUnit")+
"\t"+RsQuery->FieldByName("ApivdQty")+
"\t"+RsQuery->FieldByName("ApivdPrice")+
"\t"+RsQuery->FieldByName("ApivdNAmt")+
"\t"+RsQuery->FieldByName("ApivdTRate")+
"\t"+RsQuery->FieldByName("ApivdAmt")+
"\t"+RsQuery->FieldByName("ApivdCAmt")+
"\t"+RsQuery->FieldByName("ApivdRAmt")+
"\t"+RsQuery->FieldByName("ApivdDesc");
sgApivd->AddItem(ItemStr);
RsQuery->MoveNext();
}
RsQuery->Close();
}
__finally
{
delete RsQuery;
}
}
//---------------------------------------------------------------------------
void __fastcall TfrmQu_Apivd::FormShow(TObject *Sender)
{
FillGridWithData();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?