public ActionResult edit() { try { dynamic id = null, keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array(); XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); CommonFunctions.add_nocache_headers(); if (XVar.Pack(!(XVar)(EditPage.processEditPageSecurity((XVar)(GlobalVars.strTableName))))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } EditPage.handleBrokenRequest(); { TLayout t_layout = null; t_layout = new TLayout(new XVar("edit2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["top"] = XVar.Array(); t_layout.containers["all"] = XVar.Array(); t_layout.containers["all"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "edit")); t_layout.containers["edit"] = XVar.Array(); t_layout.containers["edit"].Add(new XVar("name", "editheader", "block", "editheader", "substyle", 2)); t_layout.containers["edit"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1)); t_layout.containers["edit"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields")); t_layout.containers["fields"] = XVar.Array(); t_layout.containers["fields"].Add(new XVar("name", "editfields", "block", "", "substyle", 1)); t_layout.containers["fields"].Add(new XVar("name", "editbuttons", "block", "editbuttons", "substyle", 2)); t_layout.skins["fields"] = "fields"; t_layout.skins["edit"] = "1"; t_layout.skins["all"] = "empty"; t_layout.blocks["top"].Add("all"); GlobalVars.page_layouts["ABC_Voting_Submitted1_edit"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } { TLayout t_layout = null; t_layout = new TLayout(new XVar("list6"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["center"] = XVar.Array(); t_layout.containers["message"] = XVar.Array(); t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1)); t_layout.skins["message"] = "2"; t_layout.blocks["center"].Add("message"); t_layout.containers["grid"] = XVar.Array(); t_layout.containers["grid"].Add(new XVar("name", "grid", "block", "grid_block", "substyle", 1)); t_layout.skins["grid"] = "grid"; t_layout.blocks["center"].Add("grid"); t_layout.containers["pagination"] = XVar.Array(); t_layout.containers["pagination"].Add(new XVar("name", "pagination", "block", "pagination_block", "substyle", 1)); t_layout.skins["pagination"] = "2"; t_layout.blocks["center"].Add("pagination"); t_layout.blocks["left"] = XVar.Array(); t_layout.containers["left"] = XVar.Array(); t_layout.containers["left"].Add(new XVar("name", "searchpanel", "block", "searchPanel", "substyle", 1)); t_layout.skins["left"] = "menu"; t_layout.blocks["left"].Add("left"); t_layout.blocks["top"] = XVar.Array(); t_layout.skins["master"] = "empty"; t_layout.blocks["top"].Add("master"); t_layout.containers["toplinks"] = XVar.Array(); t_layout.containers["toplinks"].Add(new XVar("name", "loggedas", "block", "security_block", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_advsearch", "block", "asearch_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_import", "block", "import_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_export", "block", "export_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "printpanel", "block", "print_friendly", "substyle", 1)); t_layout.skins["toplinks"] = "2"; t_layout.blocks["top"].Add("toplinks"); t_layout.containers["hmenu"] = XVar.Array(); t_layout.containers["hmenu"].Add(new XVar("name", "hmenu", "block", "menu_block", "substyle", 1)); t_layout.skins["hmenu"] = "hmenu"; t_layout.blocks["top"].Add("hmenu"); t_layout.containers["search"] = XVar.Array(); t_layout.containers["search"].Add(new XVar("name", "search", "block", "searchform_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "search_buttons", "block", "searchformbuttons_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "search_saving_buttons", "block", "searchsaving_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "details_found", "block", "details_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "page_of", "block", "pages_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "recsperpage", "block", "recordspp_block", "substyle", 1)); t_layout.skins["search"] = "1"; t_layout.blocks["top"].Add("search"); t_layout.containers["recordcontrols"] = XVar.Array(); t_layout.containers["recordcontrols"].Add(new XVar("name", "recordcontrols_new", "block", "newrecord_controls_block", "substyle", 1)); t_layout.containers["recordcontrols"].Add(new XVar("name", "recordcontrol", "block", "record_controls_block", "substyle", 1)); t_layout.skins["recordcontrols"] = "2"; t_layout.blocks["top"].Add("recordcontrols"); GlobalVars.page_layouts["ABC_Voting_Submitted1_list"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } pageMode = XVar.Clone(EditPage.readEditModeFromRequest()); xt = XVar.UnPackXTempl(new XTempl()); id = XVar.Clone(MVCFunctions.postvalue(new XVar("id"))); id = XVar.Clone((XVar.Pack(MVCFunctions.intval((XVar)(id)) == 0) ? XVar.Pack(1) : XVar.Pack(id))); keys = XVar.Clone(XVar.Array()); keys.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("editid1")), "id"); keys.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("editid2")), "record"); var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(id, "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(keys, "keys"); var_params.InitAndSetArrayItem(pageMode, "mode"); var_params.InitAndSetArrayItem(Constants.PAGE_EDIT, "pageType"); var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("a")), "action"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("fields")), "selectedFields"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue((XVar)(MVCFunctions.Concat("value_captcha_", id))), "captchaValue"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("selection")), "selection"); var_params.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("rowIds")))), "rowIds"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("mastertable")), "masterTable"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("action")), "lockingAction"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("sid")), "lockingSid"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("keys")), "lockingKeys"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("startEdit")), "lockingStart"); if (pageMode == Constants.EDIT_INLINE) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("screenWidth")), "screenWidth"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("screenHeight")), "screenHeight"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("orientation")), "orientation"); } if (pageMode == Constants.EDIT_DASHBOARD) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashelement")), "dashElementName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("table")), "dashTName"); if (XVar.Pack(MVCFunctions.postvalue(new XVar("mapRefresh")))) { var_params.InitAndSetArrayItem(true, "mapRefresh"); var_params.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("vpCoordinates")))), "vpCoordinates"); } } if ((XVar)((XVar)(pageMode == Constants.EDIT_POPUP) || (XVar)(pageMode == Constants.EDIT_INLINE)) && (XVar)(MVCFunctions.postvalue(new XVar("dashTName")))) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashTName")), "dashTName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashelement")), "dashElementName"); } if (XVar.Pack(var_params["masterTable"])) { var_params.InitAndSetArrayItem(EditPage.processMasterKeys(), "masterKeysReq"); } GlobalVars.pageObject = XVar.Clone(EditPage.EditPageFactory((XVar)(var_params))); if (XVar.Pack(GlobalVars.pageObject.isLockingRequest())) { GlobalVars.pageObject.doLockingAction(); MVCFunctions.Echo(new XVar("")); return(MVCFunctions.GetBuferContentAndClearBufer()); } GlobalVars.pageObject.init(); GlobalVars.pageObject.process(); ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public ActionResult import() { try { dynamic id = null, pageObject = null, strtablename = null, var_params = XVar.Array(); XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); MVCFunctions.Header("Expires", "Thu, 01 Jan 1970 00:00:01 GMT"); Server.ScriptTimeout = 600; if (XVar.Pack(!(XVar)(Security.processPageSecurity((XVar)(strtablename), new XVar("I"))))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } { TLayout t_layout = null; t_layout = new TLayout(new XVar("import2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["top"] = XVar.Array(); t_layout.containers["import"] = XVar.Array(); t_layout.containers["import"].Add(new XVar("name", "importheader", "block", "", "substyle", 2)); t_layout.containers["import"].Add(new XVar("name", "errormessage", "block", "", "substyle", 1)); t_layout.containers["import"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "importfields")); t_layout.containers["importfields"] = XVar.Array(); t_layout.containers["importfields"].Add(new XVar("name", "importheader_text", "block", "", "substyle", 1)); t_layout.containers["importfields"].Add(new XVar("name", "importfields", "block", "", "substyle", 1)); t_layout.containers["importfields"].Add(new XVar("name", "import_rawtext_control", "block", "", "substyle", 1)); t_layout.containers["importfields"].Add(new XVar("name", "import_preview", "block", "", "substyle", 1)); t_layout.containers["importfields"].Add(new XVar("name", "import_process", "block", "", "substyle", 1)); t_layout.containers["importfields"].Add(new XVar("name", "import_results", "block", "", "substyle", 1)); t_layout.containers["importfields"].Add(new XVar("name", "importbuttons", "block", "", "substyle", 2)); t_layout.skins["importfields"] = "fields"; t_layout.skins["import"] = "1"; t_layout.blocks["top"].Add("import"); GlobalVars.page_layouts["ABC_Voting_Submitted1_import"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } xt = XVar.UnPackXTempl(new XTempl()); id = XVar.Clone(MVCFunctions.postvalue(new XVar("id"))); id = XVar.Clone((XVar.Pack(id != XVar.Pack("")) ? XVar.Pack(id) : XVar.Pack(1))); var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(id, "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("a")), "action"); var_params.InitAndSetArrayItem(Constants.PAGE_IMPORT, "pageType"); var_params.InitAndSetArrayItem(false, "needSearchClauseObj"); var_params.InitAndSetArrayItem(GlobalVars.strOriginalTableName, "strOriginalTableName"); if (var_params["action"] == "importPreview") { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("importType")), "importType"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("importText")), "importText"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("useXHR")), "useXHR"); } else { if (var_params["action"] == "importData") { var_params.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("importData")))), "importData"); } } GlobalVars.pageObject = XVar.Clone(new ImportPage((XVar)(var_params))); GlobalVars.pageObject.init(); GlobalVars.pageObject.process(); ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public ActionResult print() { try { dynamic id = null, pageObject = null, strtablename = null, var_params = XVar.Array(); XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); CommonFunctions.add_nocache_headers(); if (XVar.Pack(!(XVar)(Security.processPageSecurity((XVar)(strtablename), new XVar("P"))))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } { TLayout t_layout = null; t_layout = new TLayout(new XVar("print"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["center"] = XVar.Array(); t_layout.containers["pageheader"] = XVar.Array(); t_layout.containers["pageheader"].Add(new XVar("name", "printheader", "block", "printheader", "substyle", 1)); t_layout.containers["pageheader"].Add(new XVar("name", "page_of_print", "block", "page_number", "substyle", 1)); t_layout.skins["pageheader"] = "empty"; t_layout.blocks["center"].Add("pageheader"); t_layout.containers["grid"] = XVar.Array(); t_layout.containers["grid"].Add(new XVar("name", "printgridnext", "block", "grid_block", "substyle", 1)); t_layout.skins["grid"] = "grid"; t_layout.blocks["center"].Add("grid"); t_layout.blocks["top"] = XVar.Array(); t_layout.containers["pdf"] = XVar.Array(); t_layout.containers["pdf"].Add(new XVar("name", "printbuttons", "block", "printbuttons", "substyle", 1)); t_layout.skins["pdf"] = "empty"; t_layout.blocks["top"].Add("pdf"); t_layout.skins["master"] = "empty"; t_layout.blocks["top"].Add("master"); GlobalVars.page_layouts["ABC_Voting_Submitted1_print"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } { TLayout t_layout = null; t_layout = new TLayout(new XVar("print"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["center"] = XVar.Array(); t_layout.containers["pageheader"] = XVar.Array(); t_layout.containers["pageheader"].Add(new XVar("name", "printheader", "block", "printheader", "substyle", 1)); t_layout.containers["pageheader"].Add(new XVar("name", "page_of_print", "block", "page_number", "substyle", 1)); t_layout.skins["pageheader"] = "empty"; t_layout.blocks["center"].Add("pageheader"); t_layout.containers["grid"] = XVar.Array(); t_layout.containers["grid"].Add(new XVar("name", "printgridnext", "block", "grid_block", "substyle", 1)); t_layout.skins["grid"] = "grid"; t_layout.blocks["center"].Add("grid"); t_layout.blocks["top"] = XVar.Array(); t_layout.containers["pdf"] = XVar.Array(); t_layout.containers["pdf"].Add(new XVar("name", "printbuttons", "block", "printbuttons", "substyle", 1)); t_layout.skins["pdf"] = "empty"; t_layout.blocks["top"].Add("pdf"); t_layout.containers["master"] = XVar.Array(); t_layout.containers["master"].Add(new XVar("name", "masterinfoprint", "block", "mastertable_block", "substyle", 1)); t_layout.skins["master"] = "empty"; t_layout.blocks["top"].Add("master"); GlobalVars.page_layouts["dbo__ABCVotes_print"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } xt = XVar.UnPackXTempl(new XTempl()); id = XVar.Clone(MVCFunctions.postvalue(new XVar("id"))); id = XVar.Clone((XVar.Pack(id != XVar.Pack("")) ? XVar.Pack(id) : XVar.Pack(1))); var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(id, "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(Constants.PAGE_PRINT, "pageType"); var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("selection")), "selection"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("all")), "allPagesMode"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("pdf")), "pdfMode"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("htmlPdfContent")), "pdfContent"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("width")), "pdfWidth"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("details")), "detailTables"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("records")), "splitByRecords"); GlobalVars.pageObject = XVar.Clone(new PrintPage((XVar)(var_params))); GlobalVars.pageObject.init(); GlobalVars.pageObject.process(); ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public ActionResult list() { try { dynamic i = null, mode = null, options = XVar.Array(), pageObject = null; XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); CommonFunctions.add_nocache_headers(); CommonFunctions.InitLookupLinks(); if (XVar.Pack(!(XVar)(ListPage.processListPageSecurity((XVar)(GlobalVars.strTableName))))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } if (XVar.Pack(ListPage.processSaveParams((XVar)(GlobalVars.strTableName)))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } { TLayout t_layout = null; t_layout = new TLayout(new XVar("list6"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["center"] = XVar.Array(); t_layout.containers["message"] = XVar.Array(); t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1)); t_layout.skins["message"] = "2"; t_layout.blocks["center"].Add("message"); t_layout.containers["grid"] = XVar.Array(); t_layout.containers["grid"].Add(new XVar("name", "grid", "block", "grid_block", "substyle", 1)); t_layout.skins["grid"] = "grid"; t_layout.blocks["center"].Add("grid"); t_layout.containers["pagination"] = XVar.Array(); t_layout.containers["pagination"].Add(new XVar("name", "pagination", "block", "pagination_block", "substyle", 1)); t_layout.skins["pagination"] = "2"; t_layout.blocks["center"].Add("pagination"); t_layout.blocks["left"] = XVar.Array(); t_layout.containers["left"] = XVar.Array(); t_layout.containers["left"].Add(new XVar("name", "searchpanel", "block", "searchPanel", "substyle", 1)); t_layout.skins["left"] = "menu"; t_layout.blocks["left"].Add("left"); t_layout.blocks["top"] = XVar.Array(); t_layout.skins["master"] = "empty"; t_layout.blocks["top"].Add("master"); t_layout.containers["toplinks"] = XVar.Array(); t_layout.containers["toplinks"].Add(new XVar("name", "loggedas", "block", "security_block", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_advsearch", "block", "asearch_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_import", "block", "import_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_export", "block", "export_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "printpanel", "block", "print_friendly", "substyle", 1)); t_layout.skins["toplinks"] = "2"; t_layout.blocks["top"].Add("toplinks"); t_layout.containers["hmenu"] = XVar.Array(); t_layout.containers["hmenu"].Add(new XVar("name", "hmenu", "block", "menu_block", "substyle", 1)); t_layout.skins["hmenu"] = "hmenu"; t_layout.blocks["top"].Add("hmenu"); t_layout.containers["search"] = XVar.Array(); t_layout.containers["search"].Add(new XVar("name", "search", "block", "searchform_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "search_buttons", "block", "searchformbuttons_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "search_saving_buttons", "block", "searchsaving_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "details_found", "block", "details_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "page_of", "block", "pages_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "recsperpage", "block", "recordspp_block", "substyle", 1)); t_layout.skins["search"] = "1"; t_layout.blocks["top"].Add("search"); t_layout.containers["recordcontrols"] = XVar.Array(); t_layout.containers["recordcontrols"].Add(new XVar("name", "recordcontrols_new", "block", "newrecord_controls_block", "substyle", 1)); t_layout.containers["recordcontrols"].Add(new XVar("name", "recordcontrol", "block", "record_controls_block", "substyle", 1)); t_layout.skins["recordcontrols"] = "2"; t_layout.blocks["top"].Add("recordcontrols"); GlobalVars.page_layouts["ABC_Voting_Submitted1_list"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } options = XVar.Clone(XVar.Array()); mode = XVar.Clone(ListPage.readListModeFromRequest()); if (mode == Constants.LIST_SIMPLE) { } else { if (mode == Constants.LIST_AJAX) { } else { if (mode == Constants.LIST_LOOKUP) { options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("table")), "mainTable"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("field")), "mainField"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("pageType")), "mainPageType"); options.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("data")))), "mainRecordData"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("mainRecordMasterTable")), "mainRecordMasterTable"); if (XVar.Pack(MVCFunctions.postvalue(new XVar("parentsExist")))) { options.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("parentCtrlsData")))), "parentCtrlsData"); } } else { if (mode == Constants.LIST_DETAILS) { } else { if (mode == Constants.LIST_DASHDETAILS) { } else { if (mode == Constants.LIST_DASHBOARD) { } else { if (mode == Constants.MAP_DASHBOARD) { } } } } } } } xt = XVar.UnPackXTempl(new XTempl((XVar)(mode != Constants.LIST_SIMPLE))); options.InitAndSetArrayItem(Constants.PAGE_LIST, "pageType"); options.InitAndSetArrayItem((XVar.Pack(MVCFunctions.postvalue(new XVar("id"))) ? XVar.Pack(MVCFunctions.postvalue(new XVar("id"))) : XVar.Pack(1)), "id"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("recordId")) + 0, "flyId"); options.InitAndSetArrayItem(mode, "mode"); options.InitAndSetArrayItem(xt, "xt"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("masterpagetype")), "masterPageType"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("mastertable")), "masterTable"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("masterid")), "masterId"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("firsttime")), "firstTime"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("sortby")), "sortBy"); if ((XVar)((XVar)(mode == Constants.LIST_DASHBOARD) && (XVar)(MVCFunctions.postvalue(new XVar("nodata")))) && (XVar)(MVCFunctions.strlen((XVar)(options["masterTable"])))) { options.InitAndSetArrayItem(true, "showNoData"); } if (mode != Constants.LIST_LOOKUP) { options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashelement")), "dashElementName"); options.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("table")), "dashTName"); } if (XVar.Pack(MVCFunctions.postvalue(new XVar("mapRefresh")))) { options.InitAndSetArrayItem(true, "mapRefresh"); options.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("vpCoordinates")))), "vpCoordinates"); } i = new XVar(1); while (XVar.Pack(MVCFunctions.REQUESTKeyExists(MVCFunctions.Concat("masterkey", i)))) { if (i == 1) { options.InitAndSetArrayItem(XVar.Array(), "masterKeysReq"); } options.InitAndSetArrayItem(MVCFunctions.postvalue(MVCFunctions.Concat("masterkey", i)), "masterKeysReq", i); i++; } GlobalVars.pageObject = XVar.Clone(ListPage.createListPage((XVar)(GlobalVars.strTableName), (XVar)(options))); if (XVar.Pack(GlobalVars.pageObject.processSaveSearch())) { MVCFunctions.Echo(new XVar("")); return(MVCFunctions.GetBuferContentAndClearBufer()); } GlobalVars.gQuery.ReplaceFieldsWithDummies((XVar)(GlobalVars.pageObject.getNotListBlobFieldsIndices())); if ((XVar)((XVar)(mode != Constants.LIST_DETAILS) && (XVar)(mode != Constants.MAP_DASHBOARD)) && (XVar)(mode != Constants.LIST_DASHBOARD)) { dynamic mapSettings = XVar.Array(); } XSession.Session.Remove("message_add"); XSession.Session.Remove("message_edit"); GlobalVars.pageObject.prepareForBuildPage(); GlobalVars.pageObject.showPage(); if (mode != Constants.LIST_SIMPLE) { MVCFunctions.Echo(new XVar("")); return(MVCFunctions.GetBuferContentAndClearBufer()); } ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public ActionResult view() { try { dynamic keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array(); XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); CommonFunctions.add_nocache_headers(); if (XVar.Pack(!(XVar)(ViewPage.processEditPageSecurity((XVar)(GlobalVars.strTableName))))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } { TLayout t_layout = null; t_layout = new TLayout(new XVar("view2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["top"] = XVar.Array(); t_layout.containers["all"] = XVar.Array(); t_layout.containers["all"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "main")); t_layout.containers["main"] = XVar.Array(); t_layout.containers["main"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "view")); t_layout.containers["view"] = XVar.Array(); t_layout.containers["view"].Add(new XVar("name", "viewheader", "block", "viewheader", "substyle", 2)); t_layout.containers["view"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields")); t_layout.containers["fields"] = XVar.Array(); t_layout.containers["fields"].Add(new XVar("name", "viewfields", "block", "", "substyle", 1)); t_layout.containers["fields"].Add(new XVar("name", "viewbuttons", "block", "viewbuttons", "substyle", 2)); t_layout.skins["fields"] = "fields"; t_layout.skins["view"] = "1"; t_layout.skins["main"] = "empty"; t_layout.skins["all"] = "empty"; t_layout.blocks["top"].Add("all"); GlobalVars.page_layouts["ABC_Voting_Submitted1_view"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } pageMode = XVar.Clone(ViewPage.readViewModeFromRequest()); xt = XVar.UnPackXTempl(new XTempl()); keys = XVar.Clone(XVar.Array()); keys.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("editid1")), "id"); keys.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("editid2")), "record"); var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("id")), "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(keys, "keys"); var_params.InitAndSetArrayItem(pageMode, "mode"); var_params.InitAndSetArrayItem(Constants.PAGE_VIEW, "pageType"); var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName"); var_params.InitAndSetArrayItem(!XVar.Equals(XVar.Pack(MVCFunctions.postvalue(new XVar("mvcPDF"))), XVar.Pack("")), "pdfMode"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("mastertable")), "masterTable"); if (pageMode == Constants.VIEW_DASHBOARD) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashelement")), "dashElementName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("table")), "dashTName"); if (XVar.Pack(MVCFunctions.postvalue(new XVar("mapRefresh")))) { var_params.InitAndSetArrayItem(true, "mapRefresh"); var_params.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("vpCoordinates")))), "vpCoordinates"); } } if (pageMode == Constants.VIEW_POPUP) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashelement")), "dashElementName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashTName")), "dashTName"); } if (XVar.Pack(var_params["masterTable"])) { var_params.InitAndSetArrayItem(ViewPage.processMasterKeys(), "masterKeysReq"); } GlobalVars.pageObject = XVar.Clone(new ViewPage((XVar)(var_params))); GlobalVars.pageObject.init(); GlobalVars.pageObject.process(); ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public ActionResult export() { try { dynamic pageObject = null, strtablename = null, var_params = XVar.Array(); XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); MVCFunctions.Header("Expires", "Thu, 01 Jan 1970 00:00:01 GMT"); if (XVar.Pack(!(XVar)(Security.processPageSecurity((XVar)(strtablename), new XVar("P"))))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } { TLayout t_layout = null; t_layout = new TLayout(new XVar("export2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["top"] = XVar.Array(); t_layout.containers["export"] = XVar.Array(); t_layout.containers["export"].Add(new XVar("name", "exportheader", "block", "", "substyle", 2)); t_layout.containers["export"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "range")); t_layout.containers["range"] = XVar.Array(); t_layout.containers["range"].Add(new XVar("name", "exprange", "block", "range_block", "substyle", 1)); t_layout.skins["range"] = "fields"; t_layout.containers["export"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "format")); t_layout.containers["format"] = XVar.Array(); t_layout.containers["format"].Add(new XVar("name", "expformat", "block", "exportformat", "substyle", 1)); t_layout.skins["format"] = "fields"; t_layout.containers["export"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields")); t_layout.containers["fields"] = XVar.Array(); t_layout.containers["fields"].Add(new XVar("name", "expoutput", "block", "", "substyle", 1)); t_layout.skins["fields"] = "fields"; t_layout.containers["export"].Add(new XVar("name", "expbuttons", "block", "", "substyle", 2)); t_layout.skins["export"] = "1"; t_layout.blocks["top"].Add("export"); GlobalVars.page_layouts["ABC_Voting_Submitted1_export"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } xt = XVar.UnPackXTempl(new XTempl()); var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("id")), "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName"); var_params.InitAndSetArrayItem(Constants.PAGE_EXPORT, "pageType"); if ((XVar)(!(XVar)(GlobalVars.eventObj.exists(new XVar("ListGetRowCount")))) && (XVar)(!(XVar)(GlobalVars.eventObj.exists(new XVar("ListQuery"))))) { var_params.InitAndSetArrayItem(false, "needSearchClauseObj"); } var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("exportFields")), "selectedFields"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("type")), "exportType"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("a")), "action"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("records")), "records"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("selection")), "selection"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("delimiter")), "csvDelimiter"); if (MVCFunctions.postvalue(new XVar("txtformatting")) == "raw") { var_params.InitAndSetArrayItem(true, "useRawValues"); } var_params.InitAndSetArrayItem(ExportPage.readModeFromRequest(), "mode"); GlobalVars.pageObject = XVar.Clone(new ExportPage((XVar)(var_params))); GlobalVars.pageObject.init(); GlobalVars.pageObject.process(); ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public ActionResult add() { try { dynamic id = null, pageMode = null, pageObject = null, var_params = XVar.Array(); XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); CommonFunctions.add_nocache_headers(); CommonFunctions.InitLookupLinks(); if (XVar.Pack(!(XVar)(AddPage.processAddPageSecurity((XVar)(GlobalVars.strTableName))))) { return(MVCFunctions.GetBuferContentAndClearBufer()); } AddPage.handleBrokenRequest(); { TLayout t_layout = null; t_layout = new TLayout(new XVar("add2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["top"] = XVar.Array(); t_layout.containers["all"] = XVar.Array(); t_layout.containers["all"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "add")); t_layout.containers["add"] = XVar.Array(); t_layout.containers["add"].Add(new XVar("name", "addheader", "block", "addheader", "substyle", 2)); t_layout.containers["add"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1)); t_layout.containers["add"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields")); t_layout.containers["fields"] = XVar.Array(); t_layout.containers["fields"].Add(new XVar("name", "addfields", "block", "", "substyle", 1)); t_layout.containers["fields"].Add(new XVar("name", "addbuttons", "block", "addbuttons", "substyle", 2)); t_layout.skins["fields"] = "fields"; t_layout.skins["add"] = "1"; t_layout.skins["all"] = "empty"; t_layout.blocks["top"].Add("all"); GlobalVars.page_layouts["ABC_Voting_Submitted1_add"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } { TLayout t_layout = null; t_layout = new TLayout(new XVar("list6"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["center"] = XVar.Array(); t_layout.containers["message"] = XVar.Array(); t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1)); t_layout.skins["message"] = "2"; t_layout.blocks["center"].Add("message"); t_layout.containers["grid"] = XVar.Array(); t_layout.containers["grid"].Add(new XVar("name", "grid", "block", "grid_block", "substyle", 1)); t_layout.skins["grid"] = "grid"; t_layout.blocks["center"].Add("grid"); t_layout.containers["pagination"] = XVar.Array(); t_layout.containers["pagination"].Add(new XVar("name", "pagination", "block", "pagination_block", "substyle", 1)); t_layout.skins["pagination"] = "2"; t_layout.blocks["center"].Add("pagination"); t_layout.blocks["left"] = XVar.Array(); t_layout.containers["left"] = XVar.Array(); t_layout.containers["left"].Add(new XVar("name", "searchpanel", "block", "searchPanel", "substyle", 1)); t_layout.skins["left"] = "menu"; t_layout.blocks["left"].Add("left"); t_layout.blocks["top"] = XVar.Array(); t_layout.skins["master"] = "empty"; t_layout.blocks["top"].Add("master"); t_layout.containers["toplinks"] = XVar.Array(); t_layout.containers["toplinks"].Add(new XVar("name", "loggedas", "block", "security_block", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_advsearch", "block", "asearch_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_import", "block", "import_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "toplinks_export", "block", "export_link", "substyle", 1)); t_layout.containers["toplinks"].Add(new XVar("name", "printpanel", "block", "print_friendly", "substyle", 1)); t_layout.skins["toplinks"] = "2"; t_layout.blocks["top"].Add("toplinks"); t_layout.containers["hmenu"] = XVar.Array(); t_layout.containers["hmenu"].Add(new XVar("name", "hmenu", "block", "menu_block", "substyle", 1)); t_layout.skins["hmenu"] = "hmenu"; t_layout.blocks["top"].Add("hmenu"); t_layout.containers["search"] = XVar.Array(); t_layout.containers["search"].Add(new XVar("name", "search", "block", "searchform_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "search_buttons", "block", "searchformbuttons_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "search_saving_buttons", "block", "searchsaving_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "details_found", "block", "details_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "page_of", "block", "pages_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "recsperpage", "block", "recordspp_block", "substyle", 1)); t_layout.skins["search"] = "1"; t_layout.blocks["top"].Add("search"); t_layout.containers["recordcontrols"] = XVar.Array(); t_layout.containers["recordcontrols"].Add(new XVar("name", "recordcontrols_new", "block", "newrecord_controls_block", "substyle", 1)); t_layout.containers["recordcontrols"].Add(new XVar("name", "recordcontrol", "block", "record_controls_block", "substyle", 1)); t_layout.skins["recordcontrols"] = "2"; t_layout.blocks["top"].Add("recordcontrols"); GlobalVars.page_layouts["ABC_Voting_Submitted1_list"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } pageMode = XVar.Clone(AddPage.readAddModeFromRequest()); xt = XVar.UnPackXTempl(new XTempl()); id = XVar.Clone(MVCFunctions.postvalue(new XVar("id"))); id = XVar.Clone((XVar.Pack(MVCFunctions.intval((XVar)(id)) == 0) ? XVar.Pack(1) : XVar.Pack(id))); var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(id, "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(pageMode, "mode"); var_params.InitAndSetArrayItem(Constants.PAGE_ADD, "pageType"); var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("a")), "action"); var_params.InitAndSetArrayItem(false, "needSearchClauseObj"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("afteradd")), "afterAdd_id"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("mastertable")), "masterTable"); if (XVar.Pack(var_params["masterTable"])) { dynamic i = null; i = new XVar(1); var_params.InitAndSetArrayItem(XVar.Array(), "masterKeysReq"); while (XVar.Pack(MVCFunctions.REQUESTKeyExists(MVCFunctions.Concat("masterkey", i)))) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(MVCFunctions.Concat("masterkey", i)), "masterKeysReq", i); i++; } } var_params.InitAndSetArrayItem(MVCFunctions.postvalue((XVar)(MVCFunctions.Concat("value_captcha_", id))), "captchaValue"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashelement")), "dashElementName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("fromDashboard")), "fromDashboard"); var_params.InitAndSetArrayItem((XVar.Pack(var_params["fromDashboard"]) ? XVar.Pack(var_params["fromDashboard"]) : XVar.Pack(MVCFunctions.postvalue(new XVar("dashTName")))), "dashTName"); if (pageMode == Constants.ADD_INLINE) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("forLookup")), "forListPageLookup"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("screenWidth")), "screenWidth"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("screenHeight")), "screenHeight"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("orientation")), "orientation"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("masterpagetype")), "masterPageType"); } if ((XVar)(pageMode == Constants.ADD_ONTHEFLY) || (XVar)((XVar)(pageMode == Constants.ADD_INLINE) && (XVar)(MVCFunctions.postvalue(new XVar("forLookup"))))) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("table")), "lookupTable"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("field")), "lookupField"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("pageType")), "lookupPageType"); if (XVar.Pack(MVCFunctions.postvalue(new XVar("parentsExist")))) { var_params.InitAndSetArrayItem(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("parentCtrlsData")))), "parentCtrlsData"); } } GlobalVars.pageObject = XVar.Clone(new AddPage((XVar)(var_params))); GlobalVars.pageObject.init(); GlobalVars.pageObject.process(); ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public ActionResult search() { try { dynamic accessGranted = null, chrt_array = XVar.Array(), cname = null, id = null, layoutVersion = null, mode = null, pageObject = null, rname = null, templatefile = null, var_params = XVar.Array(); XTempl xt; ABC_Voting_Submitted1_Variables.Apply(); CommonFunctions.add_nocache_headers(); Security.processLogoutRequest(); if (XVar.Pack(!(XVar)(CommonFunctions.isLogged()))) { Security.saveRedirectURL(); CommonFunctions.redirectToLogin(); } cname = XVar.Clone(MVCFunctions.postvalue(new XVar("cname"))); rname = XVar.Clone(MVCFunctions.postvalue(new XVar("rname"))); accessGranted = XVar.Clone(CommonFunctions.CheckTablePermissions((XVar)(GlobalVars.strTableName), new XVar("S"))); if (XVar.Pack(!(XVar)(accessGranted))) { MVCFunctions.HeaderRedirect(new XVar("menu")); } { TLayout t_layout = null; t_layout = new TLayout(new XVar("search2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["top"] = XVar.Array(); t_layout.containers["search"] = XVar.Array(); t_layout.containers["search"].Add(new XVar("name", "srchheader", "block", "searchheader", "substyle", 2)); t_layout.containers["search"].Add(new XVar("name", "srchconditions", "block", "conditions_block", "substyle", 1)); t_layout.containers["search"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields")); t_layout.containers["fields"] = XVar.Array(); t_layout.containers["fields"].Add(new XVar("name", "srchfields", "block", "", "substyle", 1)); t_layout.containers["fields"].Add(new XVar("name", "srchbuttons", "block", "searchbuttons", "substyle", 2)); t_layout.skins["fields"] = "fields"; t_layout.skins["search"] = "1"; t_layout.blocks["top"].Add("search"); GlobalVars.page_layouts["ABC_Voting_Submitted1_search"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } xt = XVar.UnPackXTempl(new XTempl()); id = XVar.Clone(MVCFunctions.postvalue(new XVar("id"))); id = XVar.Clone((XVar.Pack(id) ? XVar.Pack(id) : XVar.Pack(1))); mode = new XVar(Constants.SEARCH_SIMPLE); if (MVCFunctions.postvalue(new XVar("mode")) == "dashsearch") { mode = new XVar(Constants.SEARCH_DASHBOARD); } else { if (MVCFunctions.postvalue(new XVar("mode")) == "inlineLoadCtrl") { mode = new XVar(Constants.SEARCH_LOAD_CONTROL); layoutVersion = XVar.Clone(MVCFunctions.postvalue(new XVar("layoutVersion"))); } } var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(id, "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(mode, "mode"); var_params.InitAndSetArrayItem(cname, "chartName"); var_params.InitAndSetArrayItem(rname, "reportName"); var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName"); var_params.InitAndSetArrayItem(Constants.PAGE_SEARCH, "pageType"); var_params.InitAndSetArrayItem(templatefile, "templatefile"); var_params.InitAndSetArrayItem("ABC_Voting_Submitted1", "shortTableName"); var_params.InitAndSetArrayItem(layoutVersion, "layoutVersion"); var_params.InitAndSetArrayItem((XVar.Pack(MVCFunctions.postvalue(new XVar("searchControllerId"))) ? XVar.Pack(MVCFunctions.postvalue(new XVar("searchControllerId"))) : XVar.Pack(id)), "searchControllerId"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("ctrlField")), "ctrlField"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("isNeedSettings")), "needSettings"); if (mode == Constants.SEARCH_DASHBOARD) { var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("table")), "dashTName"); var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("dashelement")), "dashElementName"); } var_params.InitAndSetArrayItem(SearchPage.getExtraPageParams(), "extraPageParams"); GlobalVars.pageObject = XVar.Clone(new SearchPage((XVar)(var_params))); if (mode == Constants.SEARCH_LOAD_CONTROL) { GlobalVars.pageObject.displaySearchControl(); return(MVCFunctions.GetBuferContentAndClearBufer()); } GlobalVars.pageObject.init(); GlobalVars.pageObject.process(); if (mode == Constants.SEARCH_DASHBOARD) { MVCFunctions.Echo(new XVar("")); return(MVCFunctions.GetBuferContentAndClearBufer()); } ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }