📄 msogh_n.cpp
字号:
Query->Close();
} */
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghDeliver() //交货方式
{ /*
AnsiString m_SoghDeliver;
AnsiString b_SoghDeliver;
m_SoghDeliver=ReturnNeedValue(GetMasterValue("SoghDeliver"),"");
b_SoghDeliver=ReturnNeedValue(GetMasterOldValue("SoghDeliver"),"");
if(m_SoghDeliver.IsEmpty())
throw Exception("交货方式不能为空");
if(m_SoghDeliver.Length()>18)
throw Exception("交货方式代码长度不能大于18");
if(m_SoghDeliver!=b_SoghDeliver)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select delivercode from sddeliver where delivercode ='"+m_SoghDeliver+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("交货方式:"+m_SoghDeliver+"未定义");
}
Query->Close();
b_SoghDeliver = m_SoghDeliver;
} */
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghTransMode() //运输方式
{ /*
AnsiString m_SoghTransMode;
AnsiString b_SoghTransMode;
m_SoghTransMode=ReturnNeedValue(GetMasterValue("SoghTransMode"),"");
b_SoghTransMode=ReturnNeedValue(GetMasterOldValue("SoghTransMode"),"");
if(m_SoghTransMode.Length()>18)
throw Exception("运输方式代码长度不能大于18");
if(m_SoghTransMode.IsEmpty())
throw Exception("运输方式不能为空");
if(m_SoghTransMode!=b_SoghTransMode)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select TransModecode from sdTransMode where transmodecode='"+m_SoghTransMode+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("运输方式"+m_SoghTransMode+"找不到");
}
Query->Close();
} */
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghTransCode() //货运单号
{
AnsiString m_SoghTransCode;
m_SoghTransCode=ReturnNeedValue(GetMasterValue("SoghTransCode"),"");
if(m_SoghTransCode.IsEmpty())
throw Exception("货运单号不能为空");
if(m_SoghTransCode.Length()>18)
throw Exception("货运单号长度不能大于18");
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghSaler() //业务员
{ /*
AnsiString m_SoghSaler;
AnsiString b_SoghSaler;
m_SoghSaler=ReturnNeedValue(GetMasterValue("SoghSaler"),"");
b_SoghSaler=ReturnNeedValue(GetMasterOldValue("SoghSaler"),"");
if(m_SoghSaler.IsEmpty())
throw Exception("业务员代码不能为空");
if(m_SoghSaler.Length()>18)
throw Exception("业务员代码长度不能大于18");
if(m_SoghSaler!=b_SoghSaler)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select salercode from sdsaler where salercode='"+m_SoghSaler+"'");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("业务员代码:"+m_SoghSaler+"未定义");
}
Query->Close();
} */
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghUser() //制单人
{
/* AnsiString m_SoghUser;
m_SoghUser=GetMasterValue("SoghUser");
if(m_SoghUser.IsEmpty())
throw Exception("操作员代码不能为空");
if(m_SoghUser.Length()>18)
throw Exception("操作员代码长度不能大于18");*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghDesc() //备注
{
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghCheck() //审核
{
/* int m_SoghCheck;
m_SoghCheck=GetMasterValue("SoghCheck");
int b_SoghCheck;
b_SoghCheck=GetMasterOldValue("SoghCheck");
if(m_SoghCheck!=b_SoghCheck)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select SalerCode,SalerCheck from sdSaler where SalerCode='"+GetMasterValue("SoghUser")+"'");
Query->Open();
if(Query->RecordCount<1)
{
Query->Close();
throw Exception("您没在销售员表中定义!");
}
else
{
if(Query->FieldValues["SalerCheck"]==0)
{
Query->Close();
throw Exception("您没有审核/反审核权限");
}
}
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghChecker() //审核人
{
/* AnsiString m_SoghChecker;
int m_SoghCheck;
m_SoghChecker=GetMasterValue("SoghChecker");
m_SoghCheck=GetMasterValue("SoghCheck");
if(m_SoghCheck==1)
{
if(m_SoghChecker.IsEmpty())
throw Exception("审核人不能为空");
if(m_SoghChecker.Length()>18)
throw Exception("审核人代码长度不能大于18");
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghCheckDate() //审核日期
{
/* AnsiString m_SoghCheckDate;
int m_SoghCheck=GetMasterValue("SoghCheck");
m_SoghCheckDate=GetMasterValue("SoghCheckDate");
if(m_SoghCheck==1)
{
if(m_SoghCheckDate.IsEmpty())
throw Exception("审核日期不能为空");
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghClose() //结清
{
/* int m_SoghClose;
m_SoghClose=GetMasterValue("SoghClose");
if(m_SoghClose==1)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select SalerCode,SalerCheck,SalerClose from sdSaler where SalerCode='"+GetMasterValue("SoghUser")+"'");
Query->Open();
if(Query->RecordCount<1)
{
Query->Close();
throw Exception("您没在销售员表中定义!");
}
else
{
if(Query->FieldValues["SalerClose"]==0)
{
Query->Close();
throw Exception("您没有结清/反结清权限");
}
}
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghCancel() //取消
{
/* int m_SoghCancel;
m_SoghCancel=GetMasterValue("SoghCancel");
int b_SoghCancel;
b_SoghCancel=GetMasterOldValue("SoghCancel");
if(m_SoghCancel!=b_SoghCancel)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select SalerCode,SalerCheck,SalerCancel from sdSaler where SalerCode='"+GetMasterValue("SoghUser")+"'");
Query->Open();
if(Query->RecordCount<1)
{
Query->Close();
throw Exception("您没在销售员表中定义!");
}
else
{
if(Query->FieldValues["SalerCancel"]==0)
{
Query->Close();
throw Exception("您没有取消/反取消权限");
}
}
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghCancelDate() //取消日期
{
/* AnsiString m_SoghCancelDate;
int m_SoghCancel=GetMasterValue("SoghCancel");
m_SoghCancelDate=GetMasterValue("SoghCancelDate");
if(m_SoghCancel==1)
{
if(m_SoghCancelDate.IsEmpty())
throw Exception("取消日期不能为空");
}*/
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSoghCr() //取消原因
{
AnsiString m_SoghCr;
int m_SoghCancel=ReturnNeedValue(GetMasterValue("SoghCancel"),"");
m_SoghCr=ReturnNeedValue(GetMasterValue("SoghCr"),"");
if(m_SoghCancel==1)
{
if(m_SoghCr.IsEmpty())
throw Exception("取消原因不能为空");
}
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidDetailField(int FieldNo)
{
switch(FieldNo)
{
case 1:
ValidSogdLine();
break;
case 2:
ValidSogdCode();
break;
case 3:
ValidSogdSoCode();
break;
case 4:
ValidSogdSodLine();
break;
case 5:
ValidSogdGoods();
break;
case 6:
ValidSogdUnit();
break;
case 7:
ValidSogdConv();
break;
case 8:
ValidSogdQty();
break;
case 9:
ValidSogdPrice();
break;
case 10:
ValidSogdAmt();
break;
case 11:
ValidSogdTaxAmt();
break;
case 12:
ValidSogdDisc();
break;
case 13:
ValidSogdDAmt();
break;
case 16:
ValidSogdLoc();
break;
case 17:
ValidSogdBatch();
break;
case 23:
ValidSogdRecDate();
break;
case 24:
ValidSogdClose();
break;
case 25:
ValidSogdCloseDate();
break;
case 27:
ValidSogdDesc();
break;
}
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSogdLine()
{
int m_SogdLine;
m_SogdLine=ReturnNeedValue(GetDetailValue("SogdLine"),0);
if(m_SogdLine<=0)
throw Exception("发货单行号不能小于等于零");
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSogdCode()
{
AnsiString m_SogdCode;
m_SogdCode=ReturnNeedValue(GetDetailValue("SogdCode"),"");
if(m_SogdCode.IsEmpty())
throw Exception("发货单单号不能为空!!!");
if(m_SogdCode.Length()>18)
throw Exception("发货单号长度不能大于8");
}
//---------------------------------------------------------------------------
void __fastcall TKSSogh_N::ValidSogdSoCode()
{
AnsiString m_SogdSoCode;
AnsiString b_SogdSoCode;
m_SogdSoCode=ReturnNeedValue(GetDetailValue("SogdSoCode"),"");
// b_SogdSoCode=GetDetailOldValue("SogdSoCode");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -