📄 mwage.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "mWage.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
TKSWage *sdWage;
//---------------------------------------------------------------------------
__fastcall TKSWage::TKSWage()
:TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSWage::ValidHeadValues()
{
AnsiString m_WageFmonth;
AnsiString b_WageFmonth;
m_WageFmonth=GetMasterValue("WageFmonth");
b_WageFmonth=GetMasterOldValue("WageFmonth");
if(m_WageFmonth.IsEmpty())
throw Exception("财务月份不能为空");
AnsiString m_WageEmployee;
AnsiString b_WageEmployee;
m_WageEmployee=GetMasterValue("WageEmployee");
b_WageEmployee=GetMasterOldValue("WageEmployee");
if(m_WageEmployee.IsEmpty())
throw Exception("员工编号不能为空");
if(m_WageEmployee!=b_WageEmployee)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select * from sdWage where WageFmonth='"+GetMasterOldValue("WageFmonth")+"' and WageEmployee='"+m_WageEmployee+"'");
Query->Open();
if(Query->RecordCount>0)
{
Query->Close();
throw Exception("员工:'"+GetMasterValue("WageEmployee")+"'在财务月份:'"+GetMasterValue("WageFmonth")+"'的工资记录已存在");
}
Query->Close();
}
double m_WageFix;
m_WageFix=GetMasterValue("WageFix");
if(m_WageFix<0)
throw Exception("固定工资的大小不能小于零");
double m_WageBorus;
m_WageBorus=GetMasterValue("WageBorus");
if(m_WageBorus<0)
throw Exception("奖金的大小不能小于零");
double m_WageAnce;
m_WageAnce=GetMasterValue("WageAnce");
if(m_WageAnce<0)
throw Exception("津贴的大小不能小于零");
double m_WageOther;
m_WageOther=GetMasterValue("WageOther");
if(m_WageOther<0)
throw Exception("其他款项的大小不能小于零");
double m_WagePiece;
m_WagePiece=GetMasterValue("WagePiece");
if(m_WagePiece<0)
throw Exception("计件工资的大小不能小于零");
double m_WageLab;
m_WageLab=GetMasterValue("WageLab");
if(m_WageLab<0)
throw Exception("计时工资的大小不能小于零");
double m_WageTax;
m_WageTax=GetMasterValue("WageTax");
if(m_WageTax<0)
throw Exception("税金的大小不能小于零");
}
//---------------------------------------------------------------------------
void __fastcall TKSWage::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -