//List page filter-----------------------------------using Enum control
public boolean modified()
{
StudentGender studentgender;
QueryBuildDataSource qbds;
QueryBuildRange qbr;
boolean ret;
ret = super();
qbds = stutable_1_ds.query().datasourcetable(tablenum(stutable));
//qbr = qbds.addrange(fieldnum(stutable, studentgender));
qbr = SysQuery::findOrCreateRange(qbds, fieldNum(StuTable, StudentGender));
if (StudentGender::Male == str2enum(studentgender, studGender.valuestr()))//StudGender.selection())
{
qbr.value(queryValue(StudentGender::Male));
}
else if(StudentGender::Female == str2enum(studentgender, studGender.valuestr()))//StudGender.selection())
{
qbr.value(queryValue(StudentGender::Female));
}
else
{
info("gmd");
}
StuTable_1_ds.executeQuery();
StuTable_1_ds.research();
return ret;
}
public boolean modified()
{
StudentGender studentgender;
QueryBuildDataSource qbds;
QueryBuildRange qbr;
boolean ret;
ret = super();
qbds = stutable_1_ds.query().datasourcetable(tablenum(stutable));
//qbr = qbds.addrange(fieldnum(stutable, studentgender));
qbr = SysQuery::findOrCreateRange(qbds, fieldNum(StuTable, StudentGender));
if (StudentGender::Male == str2enum(studentgender, studGender.valuestr()))//StudGender.selection())
{
qbr.value(queryValue(StudentGender::Male));
}
else if(StudentGender::Female == str2enum(studentgender, studGender.valuestr()))//StudGender.selection())
{
qbr.value(queryValue(StudentGender::Female));
}
else
{
info("gmd");
}
StuTable_1_ds.executeQuery();
StuTable_1_ds.research();
return ret;
}
No comments:
Post a Comment