📄 mlr.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "mLr.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
TKSLr *sdLr;
//---------------------------------------------------------------------------
__fastcall TKSLr::TKSLr()
:TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSLr::ValidHeadValues()
{
AnsiString m_LrCode;
AnsiString b_LrCode;
m_LrCode=GetMasterValue("LrCode");
b_LrCode=GetMasterOldValue("LrCode");
if(m_LrCode.IsEmpty())
throw Exception("离职代码不能为空");
if(m_LrCode.Length()>18)
throw Exception("离职代码的长度不能大于18");
if(m_LrCode.UpperCase()!=b_LrCode.UpperCase())
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select * from sdLr where LrCode='"+m_LrCode+"'");
Query->Open();
if(Query->RecordCount>0)
{
Query->Close();
throw Exception("离职代码"+m_LrCode+"已存在");
}
Query->Close();
}
AnsiString m_LrDesc;
m_LrDesc=GetMasterValue("LrDesc");
if(m_LrDesc.IsEmpty())
throw Exception("离职原因说明不能为空");
if(m_LrDesc.Length()>255)
throw Exception("离职原因说明的长度不能大于255");
}
//---------------------------------------------------------------------------
void __fastcall TKSLr::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -