⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdtht.cpp

📁 一个以前收集的基于C/S架构的ERP客户端源代码
💻 CPP
字号:
//---------------------------------------------------------------------------

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

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

#pragma package(smart_init)
TKSDtht *sdDtht;
//---------------------------------------------------------------------------
__fastcall TKSDtht::TKSDtht()
  :TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSDtht::ValidHeadValues()
{

   AnsiString  m_DthtDept;
   AnsiString  b_DthtDept;
   m_DthtDept=GetMasterValue("DthtDept");
   b_DthtDept=GetMasterOldValue("DthtDept");
   AnsiString  m_DthtFmonth;
   m_DthtFmonth=GetMasterValue("DthtFmonth");
   AnsiString  m_DthtLoc;
   m_DthtLoc=GetMasterValue("DthtLoc");
   AnsiString  m_DthtGoods;
   m_DthtGoods=GetMasterValue("DthtGoods");
    if(m_DthtFmonth.IsEmpty())
       throw Exception("当前的财务月份不能为空!");
    if(m_DthtLoc.IsEmpty())
       throw Exception("物料的存储货位不能为空!");
    if(m_DthtGoods.IsEmpty())
       throw Exception("物料的编码不能为空!");
    if(m_DthtDept.IsEmpty())
       throw Exception("部门编码不能为空!");
    if(m_DthtDept.Length()>18)
       throw Exception("部门编码:'"+m_DthtDept+"'的长度不能大于18!");
    if(m_DthtDept.UpperCase()!=b_DthtDept.UpperCase())
    {
       //if(this->FindKey(KeyStr))
       //   throw Exception("部门编码'"+m_DthtDept+"'的帐已经存在!");
       Query->Close();
       Query->SQL->Clear();
       Query->SQL->Add("select DeptCode from sdDept where DeptCode='"+m_DthtDept+"'");
       Query->Open();
       if(Query->RecordCount<=0)
       {
          Query->Close();
          throw Exception("部门编码:'"+m_DthtDept+"'的资料未定义!");
       }
       Query->Close();
    }


   m_DthtFmonth=GetMasterValue("DthtFmonth");


   m_DthtLoc=GetMasterValue("DthtLoc");

 
   m_DthtGoods=GetMasterValue("DthtGoods");

  double m_DthtBoyQty;
   m_DthtBoyQty=GetMasterValue("DthtBoyQty");
    if(m_DthtBoyQty<0)
       throw Exception("年初的数量不能小于零!");

  double m_DthtBopQty;
   m_DthtBopQty=GetMasterValue("DthtBopQty");
    if(m_DthtBopQty<0)
       throw Exception("期初的数量不能小于零!");

 double m_DthtIopQty;
   m_DthtIopQty=GetMasterValue("DthtIopQty");

 double m_DthtOopQty;
   m_DthtOopQty=GetMasterValue("DthtOopQty");

  double m_DthtIoyQty;
   m_DthtIoyQty=GetMasterValue("DthtIoyQty");
    if(m_DthtIoyQty<0)
       throw Exception("年初收入数量不能小于零!");

  double m_DthtOoyQty;
   m_DthtOoyQty=GetMasterValue("DthtOoyQty");
    if(m_DthtOoyQty<0)
       throw Exception("年初发出数量不能小于零!");

 double m_DthtAoyQty;
   m_DthtAoyQty=GetMasterValue("DthtAoyQty");

  int m_DthtClose;
   m_DthtClose=GetMasterValue("DthtClose");

  int m_DthtInit;
   m_DthtInit=GetMasterValue("DthtInit");
}
//---------------------------------------------------------------------------
void __fastcall TKSDtht::CmdExec(AnsiString Param)
{

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

⌨️ 快捷键说明

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