mcurrency.cpp
来自「一个以前收集的基于C/S架构的ERP客户端源代码」· C++ 代码 · 共 52 行
CPP
52 行
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "mCurrency.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
TKSCurrency *sdCurrency;
//---------------------------------------------------------------------------
__fastcall TKSCurrency::TKSCurrency()
:TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSCurrency::ValidHeadValues()
{
int m_CurrencyAmtDec;
m_CurrencyAmtDec=GetMasterValue("CurrencyAmtDec");
if(m_CurrencyAmtDec<0||m_CurrencyAmtDec>6)
throw Exception("'货币金额精度'只能取'0'至'6'。");
int m_CurrencyPriceDec;
int b_CurrencyPriceDec;
m_CurrencyPriceDec=GetMasterValue("CurrencyPriceDec");
b_CurrencyPriceDec=GetMasterOldValue("CurrencyPriceDec");
if(m_CurrencyPriceDec<0||m_CurrencyPriceDec>6)
throw Exception("'货币价格精度'只能取''0'至'6'。");
b_CurrencyPriceDec = m_CurrencyPriceDec;
int m_CurrencyCarry;
m_CurrencyCarry=GetMasterValue("CurrencyCarry");
if(m_CurrencyCarry!=1 && m_CurrencyCarry!=2 && m_CurrencyCarry!=3)
throw Exception("进位只能取值1-四舍五入 2-取整 3-向上取整");
AnsiString m_CurrencySym;
m_CurrencySym=GetMasterValue("CurrencySym");
if(m_CurrencySym.Length()>2)
throw Exception("'货币符号'长度不能超过2");
int m_CurrencyPos;
m_CurrencyPos=GetMasterValue("CurrencyPos");
if(m_CurrencyPos!=1 && m_CurrencyPos!=2)
throw Exception("'符号位置'只能取1-首位 2-末位");
}
//---------------------------------------------------------------------------
void __fastcall TKSCurrency::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?