資源簡介
c++ builder6.0開發的一個小軟件,數據庫是使用sql server2008r2,可進行客戶添加,修改及查詢;消費信息的添加查詢,以及消費信息的分類統計和打印。數據庫分頁,右鍵菜單,TListView的使用.

代碼片段和文件信息
//---------------------------------------------------------------------------
#include?
#pragma?hdrstop
#include?“FmAddConRecord.h“
#include?“Unit1.h“
//---------------------------------------------------------------------------
#pragma?package(smart_init)
#pragma?resource?“*.dfm“
Tfm_addConRecord?*fm_addConRecord;
//---------------------------------------------------------------------------
__fastcall?Tfm_addConRecord::Tfm_addConRecord(TComponent*?Owner)
????????:?TForm(Owner)
{
????isAdd=false;
}
//---------------------------------------------------------------------------
void?__fastcall?Tfm_addConRecord::edit_UIDKeyPress(Tobject?*Sender
??????char?&Key)
{
????AnsiString?strUID?=?edit_UID->Text.Trim();
????if(Key==8?||?Key==13)?return;
????if(Key<‘0‘?||?Key>‘9‘?||?strUID.Length()>=10){
??????Key=0;
??????return;
????}
}
//---------------------------------------------------------------------------
void?__fastcall?Tfm_addConRecord::edit_priceKeyPress(Tobject?*Sender
??????char?&Key)
{
????AnsiString?strPrice=edit_price->Text.Trim();
????if(Key==8?||?Key==13)?return;
????if(!((Key>=‘0‘?&&?Key<=‘9‘)?||?Key==‘.‘)?||?strPrice.Length()>=9){
??????Key=0;
????}else{
??????int?index=strPrice.Pos(“.“);
??????if(Key==‘.‘?&&?index>0){
????????Key=0;
????????return;
??????}
??????AnsiString?subString=strPrice.SubString(indexstrPrice.Length()-index);
??????if(subString.Length()>=3?&&?index>0){
????????Key=0;
??????}
????}
}
//---------------------------------------------------------------------------
void?__fastcall?Tfm_addConRecord::edit_qtyKeyPress(Tobject?*Sender
??????char?&Key)
{
????AnsiString?strQty=edit_qty->Text.Trim();
????if(Key==8?||?Key==13)?return;
????if(!((Key>=‘0‘?&&?Key<=‘9‘)?||?Key==‘.‘)?||?strQty.Length()>=9){
??????Key=0;
????}else{
??????int?index=strQty.Pos(“.“);
??????if(Key==‘.‘?&&?index>0){
????????Key=0;
????????return;
??????}
??????AnsiString?subString=strQty.SubString(indexstrQty.Length()-index);
??????if(subString.Length()>=3?&&?index>0){
????????Key=0;
??????}
????}
}
//---------------------------------------------------------------------------
void?__fastcall?Tfm_addConRecord::edit_priceChange(Tobject?*Sender)
{
????AnsiString?strPrice=edit_price->Text.Trim();
????AnsiString?strQty=edit_qty->Text.Trim();
????if(strQty==““?||?strPrice==““){
??????edit_money->Text=“0“;
??????return;
????}
????double?money=strPrice.ToDouble()*strQty.ToDouble();
????if(money>9999999999.99){
??????btn_addRecord->Enabled=false;
??????label_overrange->Visible=true;
????}else{
??????btn_addRecord->Enabled=true;
??????label_overrange->Visible=false;
????}
????AnsiString?strMoney=FloatToStrF(moneyffFixed132);
????edit_money->Text=strMoney;
}
//---------------------------------------------------------------------------
void?__fastcall?Tfm_addConRecord::edit_qtyChange(Tobject?*Sender)
{
????AnsiString?strPrice=edit_price->Text.Trim();
????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-16?09:01??20181016_0825\
?????文件?????3145728??2018-10-16?08:30??20181016_0825\MYDB.mdf
?????文件?????1048576??2018-10-16?08:30??20181016_0825\MYDB_log.ldf
?????目錄???????????0??2018-10-16?08:57??20181016_0825\源碼\
?????文件????????5286??2018-10-11?16:49??20181016_0825\源碼\FmAddConRecord.cpp
?????文件??????????51??2018-10-11?16:55??20181016_0825\源碼\FmAddConRecord.ddp
?????文件????????3404??2018-10-11?16:53??20181016_0825\源碼\FmAddConRecord.dfm
?????文件????????1733??2018-10-10?14:23??20181016_0825\源碼\FmAddConRecord.h
?????文件???????30528??2018-10-15?08:20??20181016_0825\源碼\FmAddConRecord.obj
?????文件????????5286??2018-10-11?16:49??20181016_0825\源碼\FmAddConRecord.~cpp
?????文件??????????51??2018-10-11?16:55??20181016_0825\源碼\FmAddConRecord.~ddp
?????文件????????3404??2018-10-11?16:53??20181016_0825\源碼\FmAddConRecord.~dfm
?????文件????????1733??2018-10-10?14:23??20181016_0825\源碼\FmAddConRecord.~h
?????文件?????????709??2018-10-10?08:19??20181016_0825\源碼\FrmAbout.cpp
?????文件??????????51??2018-10-12?08:44??20181016_0825\源碼\FrmAbout.ddp
?????文件????????2374??2018-10-12?08:37??20181016_0825\源碼\FrmAbout.dfm
?????文件????????1002??2018-10-11?16:11??20181016_0825\源碼\FrmAbout.h
?????文件???????17444??2018-10-11?16:18??20181016_0825\源碼\FrmAbout.obj
?????文件?????????709??2018-10-10?08:19??20181016_0825\源碼\FrmAbout.~cpp
?????文件??????????51??2018-10-12?08:40??20181016_0825\源碼\FrmAbout.~ddp
?????文件????????2374??2018-10-12?08:37??20181016_0825\源碼\FrmAbout.~dfm
?????文件????????1002??2018-10-11?16:11??20181016_0825\源碼\FrmAbout.~h
?????文件????????6109??2018-10-11?15:59??20181016_0825\源碼\FrmAddUserInfo.cpp
?????文件??????????51??2018-10-11?15:59??20181016_0825\源碼\FrmAddUserInfo.ddp
?????文件????????5026??2018-10-11?11:35??20181016_0825\源碼\FrmAddUserInfo.dfm
?????文件????????2005??2018-10-10?15:15??20181016_0825\源碼\FrmAddUserInfo.h
?????文件???????29912??2018-10-15?08:20??20181016_0825\源碼\FrmAddUserInfo.obj
?????文件????????6109??2018-10-11?15:59??20181016_0825\源碼\FrmAddUserInfo.~cpp
?????文件??????????51??2018-10-11?15:59??20181016_0825\源碼\FrmAddUserInfo.~ddp
?????文件????????5026??2018-10-11?11:35??20181016_0825\源碼\FrmAddUserInfo.~dfm
?????文件????????2005??2018-10-10?15:15??20181016_0825\源碼\FrmAddUserInfo.~h
............此處省略82個文件信息
- 上一篇:opengl光照旋轉交互
- 下一篇:c++程序設計第二版 課件 北京郵電大學出版社
評論
共有 條評論