Exemple #1
0
        public ActionResult view()
        {
            try
            {
                dynamic keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                VISTOBUENO_JEFEINMEDIATO_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("view_bootstrap_2col"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version                = 3;
                    t_layout.bootstrapTheme         = "default";
                    t_layout.customCssPageName      = "VISTOBUENO_JEFEINMEDIATO_view";
                    t_layout.blocks["top"]          = XVar.Array();
                    t_layout.containers["viewpage"] = XVar.Array();
                    t_layout.containers["viewpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "header"));
                    t_layout.containers["header"] = XVar.Array();
                    t_layout.containers["header"].Add(new XVar("name", "viewheader", "block", "viewheader", "substyle", 1));

                    t_layout.skins["header"] = "";


                    t_layout.skins["viewpage"] = "";

                    t_layout.blocks["top"].Add("viewpage");
                    t_layout.containers["fields"] = XVar.Array();
                    t_layout.containers["fields"].Add(new XVar("name", "viewfields", "block", "", "substyle", 1));

                    t_layout.skins["fields"] = "";

                    t_layout.blocks["top"].Add("fields");
                    t_layout.containers["bottombuttons"] = XVar.Array();
                    t_layout.containers["bottombuttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "buttons"));
                    t_layout.containers["buttons"] = XVar.Array();
                    t_layout.containers["buttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "leftbuttons"));
                    t_layout.containers["leftbuttons"] = XVar.Array();
                    t_layout.containers["leftbuttons"].Add(new XVar("name", "viewbuttons", "block", "viewbuttons", "substyle", 1));

                    t_layout.skins["leftbuttons"] = "";


                    t_layout.containers["buttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "leftbuttons_1"));
                    t_layout.containers["leftbuttons_1"] = XVar.Array();
                    t_layout.containers["leftbuttons_1"].Add(new XVar("name", "rightviewbuttons", "block", "rightviewbuttons", "substyle", 1));

                    t_layout.skins["leftbuttons_1"] = "";


                    t_layout.skins["buttons"] = "";


                    t_layout.skins["bottombuttons"] = "";

                    t_layout.blocks["top"].Add("bottombuttons");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_view"] = t_layout;
                }

                pageMode = XVar.Clone(ViewPage.readViewModeFromRequest());
                xt       = XVar.UnPackXTempl(new XTempl());
                keys     = XVar.Clone(XVar.Array());
                keys.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("editid1")), "id_permisos");
                var_params = XVar.Clone(XVar.Array());
                var_params.InitAndSetArrayItem(CommonFunctions.postvalue_number(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(MVCFunctions.postvalue(new XVar("page")), "pageName");
                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)); }
        }
Exemple #2
0
        public ActionResult print()
        {
            try
            {
                dynamic pageObject = null, strtablename = null, var_params = XVar.Array();
                XTempl  xt;
                CommonFunctions.add_nocache_headers();
                VISTOBUENO_JEFEINMEDIATO_Variables.Apply();
                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_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version           = 3;
                    t_layout.bootstrapTheme    = "default";
                    t_layout.customCssPageName = "VISTOBUENO_JEFEINMEDIATO_print";
                    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"] = "";

                    t_layout.blocks["top"].Add("pdf");
                    t_layout.containers["master"] = XVar.Array();
                    t_layout.containers["master"].Add(new XVar("name", "masterinfo", "block", "mastertable_block", "substyle", 1));

                    t_layout.skins["master"] = "";

                    t_layout.blocks["top"].Add("master");
                    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"] = "";

                    t_layout.blocks["top"].Add("pageheader");
                    t_layout.containers["grid"] = XVar.Array();
                    t_layout.containers["grid"].Add(new XVar("name", "printgrid", "block", "grid_block", "substyle", 1));

                    t_layout.skins["grid"] = "";

                    t_layout.blocks["top"].Add("grid");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_print"] = t_layout;
                }

                xt         = XVar.UnPackXTempl(new XTempl());
                var_params = XVar.Clone(XVar.Array());
                var_params.InitAndSetArrayItem(CommonFunctions.postvalue_number(new XVar("id")), "id");
                var_params.InitAndSetArrayItem(xt, "xt");
                var_params.InitAndSetArrayItem(Constants.PAGE_PRINT, "pageType");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("page")), "pageName");
                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("details")), "detailTables");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("records")), "splitByRecords");
                var_params.InitAndSetArrayItem((XVar.Pack(MVCFunctions.postvalue(new XVar("pdfjson"))) ? XVar.Pack(Constants.PRINT_PDFJSON) : XVar.Pack(Constants.PRINT_SIMPLE)), "mode");
                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)); }
        }
Exemple #3
0
        public ActionResult edit()
        {
            try
            {
                dynamic id = null, keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                VISTOBUENO_JEFEINMEDIATO_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("edit_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version                = 3;
                    t_layout.bootstrapTheme         = "default";
                    t_layout.customCssPageName      = "VISTOBUENO_JEFEINMEDIATO_edit";
                    t_layout.blocks["top"]          = XVar.Array();
                    t_layout.containers["editpage"] = XVar.Array();
                    t_layout.containers["editpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "header"));
                    t_layout.containers["header"] = XVar.Array();
                    t_layout.containers["header"].Add(new XVar("name", "editheader", "block", "editheader", "substyle", 1));

                    t_layout.skins["header"] = "";


                    t_layout.containers["editpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "message"));
                    t_layout.containers["message"] = XVar.Array();
                    t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

                    t_layout.skins["message"] = "";


                    t_layout.containers["editpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "steps"));
                    t_layout.containers["steps"] = XVar.Array();
                    t_layout.containers["steps"].Add(new XVar("name", "multistep_nav_edit", "block", "", "substyle", 1));

                    t_layout.skins["steps"] = "";


                    t_layout.skins["editpage"] = "";

                    t_layout.blocks["top"].Add("editpage");
                    t_layout.containers["fields"] = XVar.Array();
                    t_layout.containers["fields"].Add(new XVar("name", "editfields", "block", "", "substyle", 1));

                    t_layout.skins["fields"] = "";

                    t_layout.blocks["top"].Add("fields");
                    t_layout.containers["bottombuttons"] = XVar.Array();
                    t_layout.containers["bottombuttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "buttons"));
                    t_layout.containers["buttons"] = XVar.Array();
                    t_layout.containers["buttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "leftbuttons"));
                    t_layout.containers["leftbuttons"] = XVar.Array();
                    t_layout.containers["leftbuttons"].Add(new XVar("name", "editbuttons", "block", "editbuttons", "substyle", 1));

                    t_layout.skins["leftbuttons"] = "";


                    t_layout.containers["buttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "leftbuttons_1"));
                    t_layout.containers["leftbuttons_1"] = XVar.Array();
                    t_layout.containers["leftbuttons_1"].Add(new XVar("name", "righteditbuttons", "block", "righteditbuttons", "substyle", 1));

                    t_layout.skins["leftbuttons_1"] = "";


                    t_layout.skins["buttons"] = "";


                    t_layout.skins["bottombuttons"] = "";

                    t_layout.blocks["top"].Add("bottombuttons");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_edit"] = t_layout;
                }

                {
                    TLayout t_layout = null;

                    t_layout                            = new TLayout(new XVar("list_bootstrap1"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version                    = 3;
                    t_layout.bootstrapTheme             = "default";
                    t_layout.customCssPageName          = "VISTOBUENO_JEFEINMEDIATO_list";
                    t_layout.blocks["center"]           = XVar.Array();
                    t_layout.containers["gridcontrols"] = XVar.Array();
                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "add_delete"));
                    t_layout.containers["add_delete"] = XVar.Array();
                    t_layout.containers["add_delete"].Add(new XVar("name", "add", "block", "newrecord_controls_block", "substyle", 1));

                    t_layout.containers["add_delete"].Add(new XVar("name", "recordcontrol", "block", "record_controls_block", "substyle", 1));

                    t_layout.skins["add_delete"] = "";


                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "gridinfo"));
                    t_layout.containers["gridinfo"] = XVar.Array();
                    t_layout.containers["gridinfo"].Add(new XVar("name", "details_found", "block", "details_found", "substyle", 1));

                    t_layout.containers["gridinfo"].Add(new XVar("name", "printpanel", "block", "print_friendly", "substyle", 1));

                    t_layout.containers["gridinfo"].Add(new XVar("name", "bsfieldhidepanel", "block", "field_hide_panel", "substyle", 1));

                    t_layout.skins["gridinfo"] = "";


                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "gridinfo_sort"));
                    t_layout.containers["gridinfo_sort"] = XVar.Array();
                    t_layout.containers["gridinfo_sort"].Add(new XVar("name", "reorder_records", "block", "reorder_records", "substyle", 1));

                    t_layout.skins["gridinfo_sort"] = "";


                    t_layout.skins["gridcontrols"] = "";

                    t_layout.blocks["center"].Add("gridcontrols");
                    t_layout.containers["tabs"] = XVar.Array();
                    t_layout.containers["tabs"].Add(new XVar("name", "bsgrid_tabs", "block", "grid_tabs", "substyle", 1));

                    t_layout.skins["tabs"] = "";

                    t_layout.blocks["center"].Add("tabs");
                    t_layout.containers["messagerow"] = XVar.Array();
                    t_layout.containers["messagerow"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "message"));
                    t_layout.containers["message"] = XVar.Array();
                    t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

                    t_layout.skins["message"] = "";


                    t_layout.skins["messagerow"] = "";

                    t_layout.blocks["center"].Add("messagerow");
                    t_layout.containers["center"] = XVar.Array();
                    t_layout.containers["center"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "grid"));
                    t_layout.containers["grid"] = XVar.Array();
                    t_layout.containers["grid"].Add(new XVar("name", "grid", "block", "grid_block", "substyle", 1));

                    t_layout.skins["grid"] = "";


                    t_layout.skins["center"] = "";

                    t_layout.blocks["center"].Add("center");
                    t_layout.containers["pagination"] = XVar.Array();
                    t_layout.containers["pagination"].Add(new XVar("name", "pagination", "block", "pagination_block", "substyle", 1));

                    t_layout.skins["pagination"] = "";

                    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.containers["left"].Add(new XVar("name", "filterpanel", "block", "filterPanel", "substyle", 1));

                    t_layout.skins["left"] = "";

                    t_layout.blocks["left"].Add("left");
                    t_layout.blocks["top"]      = XVar.Array();
                    t_layout.containers["menu"] = XVar.Array();
                    t_layout.containers["menu"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "hdr"));
                    t_layout.containers["hdr"] = XVar.Array();
                    t_layout.containers["hdr"].Add(new XVar("name", "logo", "block", "logo_block", "substyle", 1));

                    t_layout.containers["hdr"].Add(new XVar("name", "bsnavbarcollapse", "block", "collapse_block", "substyle", 1));

                    t_layout.skins["hdr"] = "";


                    t_layout.containers["menu"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "menu_1"));
                    t_layout.containers["menu_1"] = XVar.Array();
                    t_layout.containers["menu_1"].Add(new XVar("name", "hmenu", "block", "menu_block", "substyle", 1));

                    t_layout.containers["menu_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "more"));
                    t_layout.containers["more"] = XVar.Array();
                    t_layout.containers["more"].Add(new XVar("name", "morebutton", "block", "more_list", "substyle", 1));

                    t_layout.containers["more"].Add(new XVar("name", "loggedas", "block", "security_block", "substyle", 1));

                    t_layout.skins["more"] = "";


                    t_layout.containers["menu_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "more_1"));
                    t_layout.containers["more_1"] = XVar.Array();
                    t_layout.containers["more_1"].Add(new XVar("name", "search", "block", "searchform_block", "substyle", 1));

                    t_layout.skins["more_1"] = "";


                    t_layout.skins["menu_1"] = "";


                    t_layout.skins["menu"] = "";

                    t_layout.blocks["top"].Add("menu");
                    t_layout.blocks["topmiddle"]       = XVar.Array();
                    t_layout.containers["breadcrumbs"] = XVar.Array();
                    t_layout.containers["breadcrumbs"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "bc"));
                    t_layout.containers["bc"] = XVar.Array();
                    t_layout.containers["bc"].Add(new XVar("name", "breadcrumbs", "block", "breadcrumbs", "substyle", 1));

                    t_layout.skins["bc"] = "";


                    t_layout.skins["breadcrumbs"] = "";

                    t_layout.blocks["topmiddle"].Add("breadcrumbs");
                    t_layout.containers["masterinfo"] = XVar.Array();
                    t_layout.containers["masterinfo"].Add(new XVar("name", "masterinfo", "block", "mastertable_block", "substyle", 1));

                    t_layout.skins["masterinfo"] = "";

                    t_layout.blocks["topmiddle"].Add("masterinfo");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_list"] = t_layout;
                }

                pageMode = XVar.Clone(EditPage.readEditModeFromRequest());
                xt       = XVar.UnPackXTempl(new XTempl());
                id       = XVar.Clone(CommonFunctions.postvalue_number(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_permisos");
                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(MVCFunctions.postvalue(new XVar("page")), "pageName");
                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("captcha_1209xre", "captchaName");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue((XVar)(MVCFunctions.Concat("value_captcha_1209xre_", 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)); }
        }
Exemple #4
0
        public ActionResult import()
        {
            try
            {
                dynamic id = null, pageObject = null, strtablename = null, var_params = XVar.Array();
                XTempl  xt;
                MVCFunctions.Header("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");
                Server.ScriptTimeout = 600;
                VISTOBUENO_JEFEINMEDIATO_Variables.Apply();
                if (XVar.Pack(!(XVar)(Security.processPageSecurity((XVar)(strtablename), new XVar("I")))))
                {
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                {
                    TLayout t_layout = null;

                    t_layout                    = new TLayout(new XVar("import_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version            = 3;
                    t_layout.bootstrapTheme     = "default";
                    t_layout.customCssPageName  = "VISTOBUENO_JEFEINMEDIATO_import";
                    t_layout.blocks["top"]      = XVar.Array();
                    t_layout.containers["page"] = XVar.Array();
                    t_layout.containers["page"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "panel"));
                    t_layout.containers["panel"] = XVar.Array();
                    t_layout.containers["panel"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "header"));
                    t_layout.containers["header"] = XVar.Array();
                    t_layout.containers["header"].Add(new XVar("name", "importheader", "block", "", "substyle", 1));

                    t_layout.skins["header"] = "";


                    t_layout.containers["panel"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "body"));
                    t_layout.containers["body"] = XVar.Array();
                    t_layout.containers["body"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "message"));
                    t_layout.containers["message"] = XVar.Array();
                    t_layout.containers["message"].Add(new XVar("name", "errormessage", "block", "", "substyle", 1));

                    t_layout.skins["message"] = "";


                    t_layout.containers["body"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "import"));
                    t_layout.containers["import"] = XVar.Array();
                    t_layout.containers["import"].Add(new XVar("name", "importheader_text", "block", "", "substyle", 1));

                    t_layout.containers["import"].Add(new XVar("name", "importfields", "block", "", "substyle", 1));

                    t_layout.containers["import"].Add(new XVar("name", "import_rawtext_control", "block", "", "substyle", 1));

                    t_layout.containers["import"].Add(new XVar("name", "import_preview", "block", "", "substyle", 1));

                    t_layout.containers["import"].Add(new XVar("name", "import_process", "block", "", "substyle", 1));

                    t_layout.containers["import"].Add(new XVar("name", "import_results", "block", "", "substyle", 1));

                    t_layout.containers["import"].Add(new XVar("name", "importbuttons", "block", "", "substyle", 1));

                    t_layout.skins["import"] = "";


                    t_layout.skins["body"] = "";


                    t_layout.skins["panel"] = "";


                    t_layout.skins["page"] = "";

                    t_layout.blocks["top"].Add("page");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_import"] = t_layout;
                }

                xt         = XVar.UnPackXTempl(new XTempl());
                id         = XVar.Clone(CommonFunctions.postvalue_number(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(MVCFunctions.postvalue(new XVar("page")), "pageName");
                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)); }
        }
Exemple #5
0
        public ActionResult list()
        {
            try
            {
                dynamic i = null, mode = null, options = XVar.Array(), pageObject = null;
                XTempl  xt;
                GlobalVars.requestTable = new XVar("VISTOBUENO_JEFEINMEDIATO");
                GlobalVars.requestPage  = new XVar("list");
                CommonFunctions.add_nocache_headers();
                VISTOBUENO_JEFEINMEDIATO_Variables.Apply();
                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("list_bootstrap1"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version                    = 3;
                    t_layout.bootstrapTheme             = "default";
                    t_layout.customCssPageName          = "VISTOBUENO_JEFEINMEDIATO_list";
                    t_layout.blocks["center"]           = XVar.Array();
                    t_layout.containers["gridcontrols"] = XVar.Array();
                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "add_delete"));
                    t_layout.containers["add_delete"] = XVar.Array();
                    t_layout.containers["add_delete"].Add(new XVar("name", "add", "block", "newrecord_controls_block", "substyle", 1));

                    t_layout.containers["add_delete"].Add(new XVar("name", "recordcontrol", "block", "record_controls_block", "substyle", 1));

                    t_layout.skins["add_delete"] = "";


                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "gridinfo"));
                    t_layout.containers["gridinfo"] = XVar.Array();
                    t_layout.containers["gridinfo"].Add(new XVar("name", "details_found", "block", "details_found", "substyle", 1));

                    t_layout.containers["gridinfo"].Add(new XVar("name", "printpanel", "block", "print_friendly", "substyle", 1));

                    t_layout.containers["gridinfo"].Add(new XVar("name", "bsfieldhidepanel", "block", "field_hide_panel", "substyle", 1));

                    t_layout.skins["gridinfo"] = "";


                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "gridinfo_sort"));
                    t_layout.containers["gridinfo_sort"] = XVar.Array();
                    t_layout.containers["gridinfo_sort"].Add(new XVar("name", "reorder_records", "block", "reorder_records", "substyle", 1));

                    t_layout.skins["gridinfo_sort"] = "";


                    t_layout.skins["gridcontrols"] = "";

                    t_layout.blocks["center"].Add("gridcontrols");
                    t_layout.containers["tabs"] = XVar.Array();
                    t_layout.containers["tabs"].Add(new XVar("name", "bsgrid_tabs", "block", "grid_tabs", "substyle", 1));

                    t_layout.skins["tabs"] = "";

                    t_layout.blocks["center"].Add("tabs");
                    t_layout.containers["messagerow"] = XVar.Array();
                    t_layout.containers["messagerow"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "message"));
                    t_layout.containers["message"] = XVar.Array();
                    t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

                    t_layout.skins["message"] = "";


                    t_layout.skins["messagerow"] = "";

                    t_layout.blocks["center"].Add("messagerow");
                    t_layout.containers["center"] = XVar.Array();
                    t_layout.containers["center"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "grid"));
                    t_layout.containers["grid"] = XVar.Array();
                    t_layout.containers["grid"].Add(new XVar("name", "grid", "block", "grid_block", "substyle", 1));

                    t_layout.skins["grid"] = "";


                    t_layout.skins["center"] = "";

                    t_layout.blocks["center"].Add("center");
                    t_layout.containers["pagination"] = XVar.Array();
                    t_layout.containers["pagination"].Add(new XVar("name", "pagination", "block", "pagination_block", "substyle", 1));

                    t_layout.skins["pagination"] = "";

                    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.containers["left"].Add(new XVar("name", "filterpanel", "block", "filterPanel", "substyle", 1));

                    t_layout.skins["left"] = "";

                    t_layout.blocks["left"].Add("left");
                    t_layout.blocks["top"]      = XVar.Array();
                    t_layout.containers["menu"] = XVar.Array();
                    t_layout.containers["menu"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "hdr"));
                    t_layout.containers["hdr"] = XVar.Array();
                    t_layout.containers["hdr"].Add(new XVar("name", "logo", "block", "logo_block", "substyle", 1));

                    t_layout.containers["hdr"].Add(new XVar("name", "bsnavbarcollapse", "block", "collapse_block", "substyle", 1));

                    t_layout.skins["hdr"] = "";


                    t_layout.containers["menu"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "menu_1"));
                    t_layout.containers["menu_1"] = XVar.Array();
                    t_layout.containers["menu_1"].Add(new XVar("name", "hmenu", "block", "menu_block", "substyle", 1));

                    t_layout.containers["menu_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "more"));
                    t_layout.containers["more"] = XVar.Array();
                    t_layout.containers["more"].Add(new XVar("name", "morebutton", "block", "more_list", "substyle", 1));

                    t_layout.containers["more"].Add(new XVar("name", "loggedas", "block", "security_block", "substyle", 1));

                    t_layout.skins["more"] = "";


                    t_layout.containers["menu_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "more_1"));
                    t_layout.containers["more_1"] = XVar.Array();
                    t_layout.containers["more_1"].Add(new XVar("name", "search", "block", "searchform_block", "substyle", 1));

                    t_layout.skins["more_1"] = "";


                    t_layout.skins["menu_1"] = "";


                    t_layout.skins["menu"] = "";

                    t_layout.blocks["top"].Add("menu");
                    t_layout.blocks["topmiddle"]       = XVar.Array();
                    t_layout.containers["breadcrumbs"] = XVar.Array();
                    t_layout.containers["breadcrumbs"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "bc"));
                    t_layout.containers["bc"] = XVar.Array();
                    t_layout.containers["bc"].Add(new XVar("name", "breadcrumbs", "block", "breadcrumbs", "substyle", 1));

                    t_layout.skins["bc"] = "";


                    t_layout.skins["breadcrumbs"] = "";

                    t_layout.blocks["topmiddle"].Add("breadcrumbs");
                    t_layout.containers["masterinfo"] = XVar.Array();
                    t_layout.containers["masterinfo"].Add(new XVar("name", "masterinfo", "block", "mastertable_block", "substyle", 1));

                    t_layout.skins["masterinfo"] = "";

                    t_layout.blocks["topmiddle"].Add("masterinfo");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_list"] = t_layout;
                }

                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_POPUPDETAILS)
                            {
                            }
                            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(MVCFunctions.postvalue(new XVar("page")), "pageName");
                options.InitAndSetArrayItem(Constants.PAGE_LIST, "pageType");
                options.InitAndSetArrayItem((XVar.Pack(CommonFunctions.postvalue_number(new XVar("id"))) ? XVar.Pack(CommonFunctions.postvalue_number(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("masterpage")), "masterPage");
                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))
                {
                }
                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)); }
        }
Exemple #6
0
        public ActionResult search()
        {
            try
            {
                dynamic accessGranted = null, chrt_array = XVar.Array(), cname = null, id = null, layoutVersion = null, pageMode = null, pageObject = null, rname = null, templatefile = null, var_params = XVar.Array();
                XTempl  xt;
                CommonFunctions.add_nocache_headers();
                VISTOBUENO_JEFEINMEDIATO_Variables.Apply();
                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("search_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version                  = 3;
                    t_layout.bootstrapTheme           = "default";
                    t_layout.customCssPageName        = "VISTOBUENO_JEFEINMEDIATO_search";
                    t_layout.blocks["top"]            = XVar.Array();
                    t_layout.containers["searchpage"] = XVar.Array();
                    t_layout.containers["searchpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "header"));
                    t_layout.containers["header"] = XVar.Array();
                    t_layout.containers["header"].Add(new XVar("name", "bssearchheader", "block", "searchheader", "substyle", 1));

                    t_layout.skins["header"] = "";


                    t_layout.skins["searchpage"] = "";

                    t_layout.blocks["top"].Add("searchpage");
                    t_layout.containers["fields"] = XVar.Array();
                    t_layout.containers["fields"].Add(new XVar("name", "bssearchfields", "block", "", "substyle", 1));

                    t_layout.skins["fields"] = "";

                    t_layout.blocks["top"].Add("fields");
                    t_layout.containers["bottombuttons"] = XVar.Array();
                    t_layout.containers["bottombuttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "bbuttons"));
                    t_layout.containers["bbuttons"] = XVar.Array();
                    t_layout.containers["bbuttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "leftbuttons"));
                    t_layout.containers["leftbuttons"] = XVar.Array();
                    t_layout.containers["leftbuttons"].Add(new XVar("name", "srchbuttons", "block", "searchbuttons", "substyle", 1));

                    t_layout.skins["leftbuttons"] = "";


                    t_layout.skins["bbuttons"] = "";


                    t_layout.skins["bottombuttons"] = "";

                    t_layout.blocks["top"].Add("bottombuttons");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_search"] = t_layout;
                }

                xt       = XVar.UnPackXTempl(new XTempl());
                pageMode = XVar.Clone(SearchPage.readSearchModeFromRequest());
                if (pageMode == Constants.SEARCH_LOAD_CONTROL)
                {
                    layoutVersion = XVar.Clone(MVCFunctions.postvalue(new XVar("layoutVersion")));
                }
                var_params = XVar.Clone(XVar.Array());
                var_params.InitAndSetArrayItem(xt, "xt");
                var_params.InitAndSetArrayItem(CommonFunctions.postvalue_number(new XVar("id")), "id");
                var_params.InitAndSetArrayItem(pageMode, "mode");
                var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("page")), "pageName");
                var_params.InitAndSetArrayItem(Constants.PAGE_SEARCH, "pageType");
                var_params.InitAndSetArrayItem(cname, "chartName");
                var_params.InitAndSetArrayItem(rname, "reportName");
                var_params.InitAndSetArrayItem(templatefile, "templatefile");
                var_params.InitAndSetArrayItem("VISTOBUENO_JEFEINMEDIATO", "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 (pageMode == 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 (pageMode == Constants.SEARCH_LOAD_CONTROL)
                {
                    GlobalVars.pageObject.displaySearchControl();
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                GlobalVars.pageObject.init();
                GlobalVars.pageObject.process();
                if (pageMode == Constants.SEARCH_DASHBOARD)
                {
                    MVCFunctions.Echo(new XVar(""));
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                ViewBag.xt = xt;
                return(View(xt.GetViewPath()));
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }
Exemple #7
0
        public ActionResult export()
        {
            try
            {
                dynamic pageObject = null, strtablename = null, var_params = XVar.Array();
                XTempl  xt;
                MVCFunctions.Header("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");
                VISTOBUENO_JEFEINMEDIATO_Variables.Apply();
                if (XVar.Pack(!(XVar)(Security.processPageSecurity((XVar)(strtablename), new XVar("P")))))
                {
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                {
                    TLayout t_layout = null;

                    t_layout                    = new TLayout(new XVar("export_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version            = 3;
                    t_layout.bootstrapTheme     = "default";
                    t_layout.customCssPageName  = "VISTOBUENO_JEFEINMEDIATO_export";
                    t_layout.blocks["top"]      = XVar.Array();
                    t_layout.containers["page"] = XVar.Array();
                    t_layout.containers["page"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "page_1"));
                    t_layout.containers["page_1"] = XVar.Array();
                    t_layout.containers["page_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "panel"));
                    t_layout.containers["panel"] = XVar.Array();
                    t_layout.containers["panel"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "header"));
                    t_layout.containers["header"] = XVar.Array();
                    t_layout.containers["header"].Add(new XVar("name", "exportheader", "block", "exportheader", "substyle", 1));

                    t_layout.skins["header"] = "";


                    t_layout.containers["panel"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "body"));
                    t_layout.containers["body"] = XVar.Array();
                    t_layout.containers["body"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "range"));
                    t_layout.containers["range"] = XVar.Array();
                    t_layout.containers["range"].Add(new XVar("name", "bsexprange", "block", "range_block", "substyle", 1));

                    t_layout.skins["range"] = "";


                    t_layout.containers["body"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields"));
                    t_layout.containers["fields"] = XVar.Array();
                    t_layout.containers["fields"].Add(new XVar("name", "bsexportchoosefields", "block", "choosefields", "substyle", 1));

                    t_layout.skins["fields"] = "";


                    t_layout.containers["body"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields_1"));
                    t_layout.containers["fields_1"] = XVar.Array();
                    t_layout.containers["fields_1"].Add(new XVar("name", "bsexportformat", "block", "exportformat", "substyle", 1));

                    t_layout.skins["fields_1"] = "";


                    t_layout.containers["body"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "fields_2"));
                    t_layout.containers["fields_2"] = XVar.Array();
                    t_layout.containers["fields_2"].Add(new XVar("name", "bsexpoutput", "block", "", "substyle", 1));

                    t_layout.skins["fields_2"] = "";


                    t_layout.containers["body"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "buttons"));
                    t_layout.containers["buttons"] = XVar.Array();
                    t_layout.containers["buttons"].Add(new XVar("name", "bsexpbuttons", "block", "exportbuttons", "substyle", 2));

                    t_layout.skins["buttons"] = "";


                    t_layout.skins["body"] = "";


                    t_layout.skins["panel"] = "";


                    t_layout.skins["page_1"] = "";


                    t_layout.skins["page"] = "";

                    t_layout.blocks["top"].Add("page");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_export"] = t_layout;
                }

                xt         = XVar.UnPackXTempl(new XTempl());
                var_params = XVar.Clone(XVar.Array());
                var_params.InitAndSetArrayItem(CommonFunctions.postvalue_number(new XVar("id")), "id");
                var_params.InitAndSetArrayItem(xt, "xt");
                var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName");
                var_params.InitAndSetArrayItem(Constants.PAGE_EXPORT, "pageType");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("page")), "pageName");
                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)); }
        }
Exemple #8
0
        public ActionResult add()
        {
            try
            {
                dynamic id = null, pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                VISTOBUENO_JEFEINMEDIATO_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("add_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version                = 3;
                    t_layout.bootstrapTheme         = "default";
                    t_layout.customCssPageName      = "VISTOBUENO_JEFEINMEDIATO_add";
                    t_layout.blocks["top"]          = XVar.Array();
                    t_layout.containers["editpage"] = XVar.Array();
                    t_layout.containers["editpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "header"));
                    t_layout.containers["header"] = XVar.Array();
                    t_layout.containers["header"].Add(new XVar("name", "addheader", "block", "addheader", "substyle", 1));

                    t_layout.skins["header"] = "";


                    t_layout.containers["editpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "message"));
                    t_layout.containers["message"] = XVar.Array();
                    t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

                    t_layout.skins["message"] = "";


                    t_layout.containers["editpage"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "steps"));
                    t_layout.containers["steps"] = XVar.Array();
                    t_layout.containers["steps"].Add(new XVar("name", "multistep_nav_add", "block", "", "substyle", 1));

                    t_layout.skins["steps"] = "";


                    t_layout.skins["editpage"] = "";

                    t_layout.blocks["top"].Add("editpage");
                    t_layout.containers["fields"] = XVar.Array();
                    t_layout.containers["fields"].Add(new XVar("name", "addfields", "block", "", "substyle", 1));

                    t_layout.skins["fields"] = "";

                    t_layout.blocks["top"].Add("fields");
                    t_layout.containers["bottombuttons"] = XVar.Array();
                    t_layout.containers["bottombuttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "buttons"));
                    t_layout.containers["buttons"] = XVar.Array();
                    t_layout.containers["buttons"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "leftbuttons"));
                    t_layout.containers["leftbuttons"] = XVar.Array();
                    t_layout.containers["leftbuttons"].Add(new XVar("name", "addbuttons", "block", "addbuttons", "substyle", 1));

                    t_layout.skins["leftbuttons"] = "";


                    t_layout.skins["buttons"] = "";


                    t_layout.skins["bottombuttons"] = "";

                    t_layout.blocks["top"].Add("bottombuttons");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_add"] = t_layout;
                }

                {
                    TLayout t_layout = null;

                    t_layout                            = new TLayout(new XVar("list_bootstrap1"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version                    = 3;
                    t_layout.bootstrapTheme             = "default";
                    t_layout.customCssPageName          = "VISTOBUENO_JEFEINMEDIATO_list";
                    t_layout.blocks["center"]           = XVar.Array();
                    t_layout.containers["gridcontrols"] = XVar.Array();
                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "add_delete"));
                    t_layout.containers["add_delete"] = XVar.Array();
                    t_layout.containers["add_delete"].Add(new XVar("name", "add", "block", "newrecord_controls_block", "substyle", 1));

                    t_layout.containers["add_delete"].Add(new XVar("name", "recordcontrol", "block", "record_controls_block", "substyle", 1));

                    t_layout.skins["add_delete"] = "";


                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "gridinfo"));
                    t_layout.containers["gridinfo"] = XVar.Array();
                    t_layout.containers["gridinfo"].Add(new XVar("name", "details_found", "block", "details_found", "substyle", 1));

                    t_layout.containers["gridinfo"].Add(new XVar("name", "printpanel", "block", "print_friendly", "substyle", 1));

                    t_layout.containers["gridinfo"].Add(new XVar("name", "bsfieldhidepanel", "block", "field_hide_panel", "substyle", 1));

                    t_layout.skins["gridinfo"] = "";


                    t_layout.containers["gridcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "gridinfo_sort"));
                    t_layout.containers["gridinfo_sort"] = XVar.Array();
                    t_layout.containers["gridinfo_sort"].Add(new XVar("name", "reorder_records", "block", "reorder_records", "substyle", 1));

                    t_layout.skins["gridinfo_sort"] = "";


                    t_layout.skins["gridcontrols"] = "";

                    t_layout.blocks["center"].Add("gridcontrols");
                    t_layout.containers["tabs"] = XVar.Array();
                    t_layout.containers["tabs"].Add(new XVar("name", "bsgrid_tabs", "block", "grid_tabs", "substyle", 1));

                    t_layout.skins["tabs"] = "";

                    t_layout.blocks["center"].Add("tabs");
                    t_layout.containers["messagerow"] = XVar.Array();
                    t_layout.containers["messagerow"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "message"));
                    t_layout.containers["message"] = XVar.Array();
                    t_layout.containers["message"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

                    t_layout.skins["message"] = "";


                    t_layout.skins["messagerow"] = "";

                    t_layout.blocks["center"].Add("messagerow");
                    t_layout.containers["center"] = XVar.Array();
                    t_layout.containers["center"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "grid"));
                    t_layout.containers["grid"] = XVar.Array();
                    t_layout.containers["grid"].Add(new XVar("name", "grid", "block", "grid_block", "substyle", 1));

                    t_layout.skins["grid"] = "";


                    t_layout.skins["center"] = "";

                    t_layout.blocks["center"].Add("center");
                    t_layout.containers["pagination"] = XVar.Array();
                    t_layout.containers["pagination"].Add(new XVar("name", "pagination", "block", "pagination_block", "substyle", 1));

                    t_layout.skins["pagination"] = "";

                    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.containers["left"].Add(new XVar("name", "filterpanel", "block", "filterPanel", "substyle", 1));

                    t_layout.skins["left"] = "";

                    t_layout.blocks["left"].Add("left");
                    t_layout.blocks["top"]      = XVar.Array();
                    t_layout.containers["menu"] = XVar.Array();
                    t_layout.containers["menu"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "hdr"));
                    t_layout.containers["hdr"] = XVar.Array();
                    t_layout.containers["hdr"].Add(new XVar("name", "logo", "block", "logo_block", "substyle", 1));

                    t_layout.containers["hdr"].Add(new XVar("name", "bsnavbarcollapse", "block", "collapse_block", "substyle", 1));

                    t_layout.skins["hdr"] = "";


                    t_layout.containers["menu"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "menu_1"));
                    t_layout.containers["menu_1"] = XVar.Array();
                    t_layout.containers["menu_1"].Add(new XVar("name", "hmenu", "block", "menu_block", "substyle", 1));

                    t_layout.containers["menu_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "more"));
                    t_layout.containers["more"] = XVar.Array();
                    t_layout.containers["more"].Add(new XVar("name", "morebutton", "block", "more_list", "substyle", 1));

                    t_layout.containers["more"].Add(new XVar("name", "loggedas", "block", "security_block", "substyle", 1));

                    t_layout.skins["more"] = "";


                    t_layout.containers["menu_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "more_1"));
                    t_layout.containers["more_1"] = XVar.Array();
                    t_layout.containers["more_1"].Add(new XVar("name", "search", "block", "searchform_block", "substyle", 1));

                    t_layout.skins["more_1"] = "";


                    t_layout.skins["menu_1"] = "";


                    t_layout.skins["menu"] = "";

                    t_layout.blocks["top"].Add("menu");
                    t_layout.blocks["topmiddle"]       = XVar.Array();
                    t_layout.containers["breadcrumbs"] = XVar.Array();
                    t_layout.containers["breadcrumbs"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "bc"));
                    t_layout.containers["bc"] = XVar.Array();
                    t_layout.containers["bc"].Add(new XVar("name", "breadcrumbs", "block", "breadcrumbs", "substyle", 1));

                    t_layout.skins["bc"] = "";


                    t_layout.skins["breadcrumbs"] = "";

                    t_layout.blocks["topmiddle"].Add("breadcrumbs");
                    t_layout.containers["masterinfo"] = XVar.Array();
                    t_layout.containers["masterinfo"].Add(new XVar("name", "masterinfo", "block", "mastertable_block", "substyle", 1));

                    t_layout.skins["masterinfo"] = "";

                    t_layout.blocks["topmiddle"].Add("masterinfo");
                    GlobalVars.page_layouts["VISTOBUENO_JEFEINMEDIATO_list"] = t_layout;
                }

                pageMode   = XVar.Clone(AddPage.readAddModeFromRequest());
                xt         = XVar.UnPackXTempl(new XTempl());
                id         = XVar.Clone(CommonFunctions.postvalue_number(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("page")), "pageName");
                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("captcha_1209xre", "captchaName");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue((XVar)(MVCFunctions.Concat("value_captcha_1209xre_", 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)); }
        }