码迷,mamicode.com
首页 > 其他好文 > 详细

Dialog篩選數據

时间:2014-08-20 16:01:12      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:des   os   for   ar   log   line   new   ad   

public void context()
{
int selectMenu;
FormRun formRun;
Args args;
Name strtext;
QueryBuildDataSource qbds;
QueryRun qr;
Query q;
PopupMenu menu = new PopupMenu(element.hWnd());
int a = menu.insertItem("filter by field");
int b = menu.insertItem("filter by selected field");
int c = menu.insertItem("close");
;
selectMenu = menu.draw();
switch (selectMenu)
{
case -1:
break;
case a:
args = new Args(‘SysFormSearch‘);
formRun = new FormRun(args);
formRun.run();
formRun.wait();
strtext = formRun.design().controlName(‘FindEdit‘).valueStr();
if (strtext)
{
q = TestOne_ds.query();
qbds = q.dataSourceTable(tablenum(TestOne));
qbds = qbds.addDataSource(tablenum(TestLink));
qbds.addLink(fieldnum(TestOne,Id),fieldnum(TestLink,Id));
qbds.addRange(fieldnum(TestLink,Name)).value(strtext);
TestOne_ds.query(q);
TestOne_ds.executeQuery();
}
break;
}
//super();

}


case b:
q = PurchLine_ds.query();
qb1 = q.dataSourceTable(tablenum(PurchLine));
qb1 = qb1.addDataSource(tablenum(InventTable));
qb1.addLink(fieldnum(PurchLine,ItemId),fieldnum(InventTable,ItemId));
qb1.addRange(fieldnum(PurchLine,ItemId)).value(Id.valueStr());
PurchLine_ds.query(q);
PurchLine_ds.executeQuery();
break;
case c:
q = new Query();
qb1 = q.addDataSource(tablenum(PurchLine));
qb1.clearLinks();
qb1.clearRanges();
PurchLine_ds.query(q);
PurchLine_ds.removeFilter();
break;
Default:
break;

Dialog篩選數據,布布扣,bubuko.com

Dialog篩選數據

标签:des   os   for   ar   log   line   new   ad   

原文地址:http://www.cnblogs.com/AllenFeng/p/3924516.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!