mpgd.cpp

来自「一个以前收集的基于C/S架构的ERP客户端源代码」· C++ 代码 · 共 59 行

CPP
59
字号
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop
#include "mPgd.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)
TKSPgd *sdPgd;
//---------------------------------------------------------------------------
__fastcall TKSPgd::TKSPgd()
  :TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPgd::ValidHeadValues()
{
   AnsiString  m_PgdCode;
   AnsiString  b_PgdCode;
   AnsiString  m_PgdSupplyCode;
   m_PgdSupplyCode=GetMasterValue("PgdSupplyCode");
   m_PgdCode=GetMasterValue("PgdCode");
   b_PgdCode=GetMasterOldValue("PgdCode");
    if(m_PgdSupplyCode.IsEmpty())
      throw Exception("供应商代码不能为空");
    if(m_PgdCode.LowerCase().IsEmpty())
      throw Exception("供应商对物料编码不能为空");
    if(m_PgdCode.LowerCase().Length()>18)
      throw Exception("供应商对应物料编码长度不能大于18");
    b_PgdCode.LowerCase() = m_PgdCode.LowerCase();

   AnsiString  m_PgdName;
   AnsiString  b_PgdName;
   m_PgdName=GetMasterValue("PgdName");
   b_PgdName=GetMasterOldValue("PgdName");
    if(m_PgdName.LowerCase().IsEmpty())
      throw Exception("供应商对应物料名称不能为空");
    if(m_PgdName.LowerCase().Length()>20)
      throw Exception("供应商对应物料名称长度不能大于20");
    b_PgdName.LowerCase() = m_PgdName.LowerCase();

  double m_PgdPot;
   m_PgdPot=GetMasterValue("PgdPot");
    if(m_PgdPot < 0)
     throw Exception("供应时间不能小于零");

  double m_PgdPoc;
   m_PgdPoc=GetMasterValue("PgdPoc");
    if(m_PgdPoc < 0)
     throw Exception("供应能力不能小于零");
}
//---------------------------------------------------------------------------
void __fastcall TKSPgd::CmdExec(AnsiString Param)
{

}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?