protected virtual XVar exportByType() { dynamic listarray = null, myPage = null, nPageSize = null, rs = null; myPage = new XVar(1); nPageSize = new XVar(0); if (this.records == "page") { myPage = XVar.Clone((int)XSession.Session[MVCFunctions.Concat(this.tName, "_pagenumber")]); if (XVar.Pack(!(XVar)(myPage))) { myPage = new XVar(1); } nPageSize = XVar.Clone((int)XSession.Session[MVCFunctions.Concat(this.tName, "_pagesize")]); if (XVar.Pack(!(XVar)(nPageSize))) { nPageSize = XVar.Clone(this.pSet.getInitialPageSize()); } if (nPageSize < XVar.Pack(0)) { nPageSize = new XVar(0); } } listarray = new XVar(null); if (XVar.Pack(this.eventsObject.exists(new XVar("ListQuery")))) { dynamic orderClause = null, orderFieldsData = XVar.Array(); orderClause = XVar.Clone(OrderClause.createFromPage(this)); orderFieldsData = XVar.Clone(orderClause.getListQueryData()); listarray = XVar.Clone(this.eventsObject.ListQuery((XVar)(this.searchClauseObj), (XVar)(orderFieldsData["fieldsForSort"]), (XVar)(orderFieldsData["howToSortData"]), (XVar)(this.masterTable), (XVar)(this.masterKeysReq), (XVar)(getSelectedRecords()), (XVar)(nPageSize), (XVar)(myPage), this)); } if (listarray != null) { rs = XVar.Clone(listarray); } else { dynamic _rs = null; _rs = XVar.Clone(this.connection.queryPage((XVar)(this.querySQL), (XVar)(myPage), (XVar)(nPageSize), (XVar)(XVar.Pack(0) < nPageSize))); rs = XVar.Clone(_rs.getQueryHandle()); } MVCFunctions.runner_set_page_timeout(new XVar(300)); if (XVar.Pack(this.pSet.getRecordsLimit())) { nPageSize = XVar.Clone(this.pSet.getRecordsLimit() - (myPage - 1) * nPageSize); } exportTo((XVar)(this.exportType), (XVar)(rs), (XVar)(nPageSize)); this.connection.close(); return(null); }
protected override XVar createOrderByObject() { this.orderClause = XVar.Clone(OrderClause.createFromPage(this, new XVar(false))); return(null); }