AX 2009 信息日志关联显示窗体
查询后弹出信息日志项目关联打开项目关联的窗体,如图
查询写在了按钮事件下:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
void clicked()
{
SalesLine t_salesLine;
QueryBuildDataSource m_qbds;
QueryBuildRange m_qbrTime,m_qbrExtId;
QueryRun m_qr;
Query m_q = new Query();
Str m_frTime,m_toTime,m_ExtId;
Boolean m_isFind = true;
;
super();
m_frTime = frDateEdit.valueStr();
m_toTime = toDateEdit.valueStr();
m_ExtId = ExtIdEdit.valueStr();
m_qbds = m_q.addDataSource(tablenum(SalesLine));
m_qbrTime = m_qbds.addRange(fieldnum(SalesLine,createdDateTime));
m_qbrTime.value(m_frTime + ".." + m_toTime);
m_qbrExtId = m_qbds.addRange(fieldnum(SalesLine,ExternalItemId));
m_qbrExtId.value(m_ExtId);
m_qr = new QueryRun(m_q);
while(m_qr.next())
{
t_salesLine = m_qr.get(tablenum(SalesLine));
info(strfmt("@IWS1070",t_salesLine.SalesId,t_salesLine.ItemId),'',SysInfoAction_TableField::newBuffer(t_salesLine));
m_isFind = false;
}
if(m_isFind)
{
info("此条件范围没有数据!");
}
}
{
SalesLine t_salesLine;
QueryBuildDataSource m_qbds;
QueryBuildRange m_qbrTime,m_qbrExtId;
QueryRun m_qr;
Query m_q = new Query();
Str m_frTime,m_toTime,m_ExtId;
Boolean m_isFind = true;
;
super();
m_frTime = frDateEdit.valueStr();
m_toTime = toDateEdit.valueStr();
m_ExtId = ExtIdEdit.valueStr();
m_qbds = m_q.addDataSource(tablenum(SalesLine));
m_qbrTime = m_qbds.addRange(fieldnum(SalesLine,createdDateTime));
m_qbrTime.value(m_frTime + ".." + m_toTime);
m_qbrExtId = m_qbds.addRange(fieldnum(SalesLine,ExternalItemId));
m_qbrExtId.value(m_ExtId);
m_qr = new QueryRun(m_q);
while(m_qr.next())
{
t_salesLine = m_qr.get(tablenum(SalesLine));
info(strfmt("@IWS1070",t_salesLine.SalesId,t_salesLine.ItemId),'',SysInfoAction_TableField::newBuffer(t_salesLine));
m_isFind = false;
}
if(m_isFind)
{
info("此条件范围没有数据!");
}
}
作者:Kurodo
出处:http://Kurodo.cnblogs.com
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
出处:http://Kurodo.cnblogs.com
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。