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

📄 mssp.cpp

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

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

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

#pragma package(smart_init)
TKSSsp *sdSsp;
//---------------------------------------------------------------------------
__fastcall TKSSsp::TKSSsp()
  :TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSSsp::ValidMasterField(int FieldNo)
{
  switch(FieldNo)
  {
    case 1:  //销售员
      ValidSspSaler();
      break;
    case 2:  //年度
      ValidSspYear();
      break;
    case 3:  //月份
      ValidSspFmonth();
      break;
    case 4:  //计划额
      ValidSspPAmt();
      break;
  }
}
//---------------------------------------------------------------------------
void __fastcall TKSSsp::ValidSspSaler()  //销售员
{
/*  if(m_SspSaler!=b_SspSaler)
    {
      Query->Close();
      Query->SQL->Clear();
      Query->SQL->Add("Select * from sdSaler where salercode='"+m_SspSaler+"'");
      Query->Open();
      if(Query->RecordCount<1)
      {
        Query->Close();
        throw Exception("该销售员'"+m_SspSaler+"'未在业务员表里定义");
      }
       Query->Close();
     }*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSsp::ValidSspYear()  //年度
{

}
//---------------------------------------------------------------------------
void __fastcall TKSSsp::ValidSspFmonth()  //月份
{
   AnsiString  m_SspFmonth;
   AnsiString  b_SspFmonth;
   m_SspFmonth=GetMasterValue("SspFmonth");
   b_SspFmonth=GetMasterOldValue("SspFmonth");
  /*    if(m_SspFmonth!=b_SspFmonth)
       {
          Query->Close();
          Query->SQL->Clear();
          Query->SQL->Add("Select * from sdSsp where SspFmonth='"+m_SspFmonth+"' and SspSaler='"+m_SspSaler+"'");
          Query->Open();
          if(Query->RecordCount>0)
          {
            Query->Close();
            throw Exception("该销售员的财务月份为:'"+m_SspFmonth+"'的计划已有定义");
          }
          Query->Close();
       }*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSsp::ValidSspPAmt()  //计划额
{
  double m_SspPAmt;
   m_SspPAmt=GetMasterValue("SspPAmt");
       if(m_SspPAmt<0)
          throw Exception("计划数量需大于0");
}
//---------------------------------------------------------------------------
void __fastcall TKSSsp::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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