kspurfuc.cpp
来自「一个以前收集的基于C/S架构的ERP客户端源代码」· C++ 代码 · 共 50 行
CPP
50 行
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "KSPurFuc.h"
#include "AncBillBase.h"
#include "QueryBaseForm.h"
#include "StdBaseForm.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%
// is legit goods buyer
//---------------------------------------------------------------------------
bool __fastcall PurchParamInit(AnsiString ParamCode,AnsiString ParamValue,TComResultSet *ParamQuery)
{
if(ParamCode.IsEmpty()==true)
return false; //when paramcode ="" ,false;
ParamQuery->Close();
ParamQuery->Open("select parametercode,parametervalue from sdparameter where parametercode= '"+ParamCode+"' and Parametervalue ='"+ParamValue+"'","parametercode");
if(ParamQuery->RecordCount >0)
return true; //else query if exist
else
return false;
}
//---------------------------------------------------------------------------
int IsLegitGU(AnsiString GoodsCode, TComResultSet *Query)
{
if ( GoodsCode=="" ) return -1;
Query->Close();
try{
Query->Open("SELECT ParameterValue FROM sdParameter WHERE ParameterCode='10413'","");
if (StrToInt(Query->FieldByName("ParameterValue")))
{
Query->Close();
Query->Open("SELECT GoodsSaler, GoodsCode FROM sdGoods WHERE "
"sdGoods.GoodsSaler='"+ g_sdUserCode +"' AND sdGoods.GoodsCode='"+GoodsCode+"'","");
if ( Query->RecordCount == 0 ){
ShowMessage("当前用户没有权限操作该物料!");
return 0;
}
return 1;
}
}
catch(...)
{ throw Exception("参数10413(启用物料销售员) 错误!"); }
Query->Close();
return -1;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?