📄 mprofession.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "mProfession.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
TKSProfession *ksProfession;
//---------------------------------------------------------------------------
__fastcall TKSProfession::TKSProfession()
:TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSProfession::ValidHeadValues()
{
AnsiString m_ProfessionCode;
AnsiString b_ProfessionCode;
m_ProfessionCode=GetMasterValue("ProfessionCode");
b_ProfessionCode=GetMasterOldValue("ProfessionCode");
if(m_ProfessionCode.IsEmpty())
throw Exception("专业代码不能为空");
if(m_ProfessionCode.Length()>18)
throw Exception("专业代码的长度不能大于18");
if(m_ProfessionCode.UpperCase()!=b_ProfessionCode.UpperCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select * from sdProfession where ProfessionCode='"+m_ProfessionCode+"'");
Query->Open();
if(Query->RecordCount>0)
{
Query->Close();
throw Exception("专业代码"+m_ProfessionCode+"已存在");
}
Query->Close();
}
AnsiString m_ProfessionName;
m_ProfessionName=GetMasterValue("ProfessionName");
if(m_ProfessionName.IsEmpty())
throw Exception("专业名称不能为空");
if(m_ProfessionName.Length()>20)
throw Exception("专业名称的长度不能大于20");
AnsiString m_ProfessionDesc;
m_ProfessionDesc=GetMasterValue("ProfessionDesc");
if(m_ProfessionDesc.IsEmpty())
throw Exception("专业说明不能为空");
if(m_ProfessionDesc.Length()>255)
throw Exception("专业说明的长度不能大于255");
}
//---------------------------------------------------------------------------
void __fastcall TKSProfession::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -