📄 mclient.cpp
字号:
if(m_ClientCredit.LowerCase().Length()>18)
throw Exception("信誉度编码长度不能大于18");
if(m_ClientCredit.LowerCase().IsEmpty()==false && m_ClientCredit!=b_ClientCredit.LowerCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select CreditCode from sdCredit where CreditCode='"+m_ClientCredit+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("信誉度编码:'"+m_ClientCredit+"'未定义");
}
Query->Close();
}
*/
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientCurrency() //币种
{
}
void __fastcall TKSClient::ValidClientCreditTerm() //信用期限
{
int m_ClientCreditTerm;
m_ClientCreditTerm=GetMasterValue("ClientCreditTerm");
if(m_ClientCreditTerm<0)
throw Exception("信誉期限不能小于零");
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientCancel() //停用
{
/* int m_ClientCancel;
int b_ClientCancel;
AnsiString g_sdUserCode="1001";
m_ClientCancel=GetMasterValue("ClientCancel");
b_ClientCancel=GetMasterOldValue("ClientCancel");
if(m_ClientCancel!=0 && m_ClientCancel!=1)
throw Exception("取消标志只能取值0-正常1-取消");
if(m_ClientCancel!=b_ClientCancel)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select SalerCode,SalerCheck,SalerCancel from sdSaler where SalerCode='"+g_sdUserCode+"'");
Query->Open();
if(Query->RecordCount<1)
{
Query->Close();
throw Exception("您没在销售员表中定义!");
}
else
{
if(Query->FieldValues["SalerCancel"]==0)
{
Query->Close();
throw Exception("您没有取消/反取消权限");
}
}
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientCancelDate() //停用日期
{
AnsiString m_ClientCancelDate;
AnsiString m_ClientCreateDate;
m_ClientCancelDate=GetMasterValue("ClientCancelDate");
m_ClientCreateDate=GetMasterOldValue("ClientCreateDate");
if(m_ClientCancelDate<m_ClientCreateDate)
{
throw Exception("取消日期不能小于创建日期");
}
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientCreateDate() //建立日期
{
AnsiString m_ClientCreateDate;
m_ClientCreateDate=GetMasterValue("ClientCreateDate");
if(m_ClientCreateDate.LowerCase().IsEmpty())
throw Exception("创建日期不能为空");
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientTaxCode() //税码
{
/* AnsiString m_ClientTaxCode;
AnsiString b_ClientTaxCode;
m_ClientTaxCode=GetMasterValue("ClientTaxCode");
b_ClientTaxCode=GetMasterOldValue("ClientTaxCode");
if(m_ClientTaxCode.LowerCase().Length()>18)
throw Exception("税码长度不能大于18");
if(m_ClientTaxCode.LowerCase().IsEmpty()==false && m_ClientTaxCode.LowerCase()!=b_ClientTaxCode.LowerCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select taxcode from sdTax where taxcode='"+m_ClientTaxCode+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("税码:'"+m_ClientTaxCode+"'未定义");
}
Query->Close();
}
*/
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientTaxNo() //税号
{
AnsiString m_ClientTaxNo;
m_ClientTaxNo=GetMasterValue("ClientTaxNo");
if(m_ClientTaxNo.LowerCase().Length()>18)
throw Exception("税号长度不能大于18");
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientArea() //所在地区
{
/* AnsiString m_ClientArea;
AnsiString b_ClientArea;
m_ClientArea=GetMasterValue("ClientArea");
b_ClientArea=GetMasterOldValue("ClientArea");
if(m_ClientArea.LowerCase().IsEmpty())
throw Exception("地区编码不能为空");
if(m_ClientArea.LowerCase().Length()>18)
throw Exception("地区编码长度不能大于18");
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select AreaEnd from sdArea where Areacode='"+m_ClientArea+"'");
Query->Open();
if(Query->FieldValues["AreaEnd"]==0)
{
Query->Close();
throw Exception("地区编码不是末级");
}
*/
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientSmode() //销售类型
{
/* AnsiString m_ClientSmode;
AnsiString b_ClientSmode;
m_ClientSmode=GetMasterValue("ClientSmode");
b_ClientSmode=GetMasterOldValue("ClientSmode");
if(m_ClientSmode.LowerCase().IsEmpty())
throw Exception("销售类型不能为空");
if(m_ClientSmode.LowerCase().Length()>18)
throw Exception("销售类长度不能大于18");
if(m_ClientSmode.LowerCase()!=b_ClientSmode.LowerCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select Smodecode from sdSmode where Smodecode='"+m_ClientSmode+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("销售类型:'"+m_ClientSmode+"'未定义");
}
Query->Close();
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientSaler() //销售员
{
/* AnsiString m_ClientSaler;
AnsiString b_ClientSaler;
m_ClientSaler=GetMasterValue("ClientSaler");
b_ClientSaler=GetMasterOldValue("ClientSaler");
if(m_ClientSaler.LowerCase().IsEmpty())
throw Exception("业务员代码不能为空");
if(m_ClientSaler.LowerCase().Length()>18)
throw Exception("业务员代码长度不能大于18");
if(m_ClientSaler.LowerCase()!=b_ClientSaler.LowerCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select Salercode from sdSaler where Salercode='"+m_ClientSaler+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("业务员:'"+m_ClientSaler+"'未定义");
}
Query->Close();
}
*/}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientTrade() //所属行业
{
/* AnsiString m_ClientTrade;
AnsiString b_ClientTrade;
m_ClientTrade=GetMasterValue("ClientTrade");
b_ClientTrade=GetMasterOldValue("ClientTrade");
if(m_ClientTrade.LowerCase().IsEmpty())
throw Exception("行业类型不能为空");
if(m_ClientTrade.LowerCase().Length()>18)
throw Exception("行业类型长度不能大于18");
if(m_ClientTrade.LowerCase()!=b_ClientTrade.LowerCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select tradecode from sdTrade where tradecode='"+m_ClientTrade+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("行业类型:'"+m_ClientTrade+"'未定义");
}
Query->Close();
}
*/}
//---------------------------------------------------------------------------
void __fastcall TKSClient::ValidClientSpt() //价格类型
{
/* AnsiString m_ClientSpt;
AnsiString b_ClientSpt;
m_ClientSpt=GetMasterValue("ClientSpt");
b_ClientSpt=GetMasterOldValue("ClientSpt");
if(m_ClientSpt.LowerCase().Length()>18)
throw Exception("价格类型长度不能大于18");
if(m_ClientSpt.IsEmpty()==false && m_ClientSpt.LowerCase()!=b_ClientSpt.LowerCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select Sptcode from sdSpt where Sptcode='"+m_ClientSpt+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("销售价格类型:'"+m_ClientSpt+"'未定义");
}
Query->Close();
}
*/}
//---------------------------------------------------------------------------
void __fastcall TKSClient::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -