Beispiel #1
0
        public ActionResult view()
        {
            try
            {
                dynamic keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                dbo_DEPARTAMENTO_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      = "dbo_DEPARTAMENTO_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["dbo_DEPARTAMENTO_view"] = 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          = "dbo_EMPLEADO_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["dbo_EMPLEADO_list"] = 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          = "dbo_PERMISOSGRUPOS_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["dbo_PERMISOSGRUPOS_list"] = 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          = "Saldo_Horas_Empleado_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["Saldo_Horas_Empleado_list"] = 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          = "dbo_GRUPOS_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["dbo_GRUPOS_list"] = 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_departamento");
                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)); }
        }
Beispiel #2
0
        public ActionResult print()
        {
            try
            {
                dynamic pageObject = null, strtablename = null, var_params = XVar.Array();
                XTempl  xt;
                CommonFunctions.add_nocache_headers();
                dbo_DEPARTAMENTO_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 = "dbo_DEPARTAMENTO_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["dbo_DEPARTAMENTO_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)); }
        }
Beispiel #3
0
        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)); }
        }
Beispiel #4
0
        public ActionResult edit()
        {
            try
            {
                dynamic id = null, keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                dbo_acceso_uggroups_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      = "dbo_acceso_uggroups_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["dbo_acceso_uggroups_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          = "dbo_acceso_uggroups_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["dbo_acceso_uggroups_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")), "GroupID");
                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)); }
        }
Beispiel #5
0
        public ActionResult login()
        {
            try
            {
                dynamic pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                CommonFunctions.add_nocache_headers();
                {
                    TLayout t_layout = null;

                    t_layout                     = new TLayout(new XVar("login2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue"));
                    t_layout.version             = 2;
                    t_layout.blocks["top"]       = XVar.Array();
                    t_layout.containers["login"] = XVar.Array();
                    t_layout.containers["login"].Add(new XVar("name", "loginheader", "block", "loginheader", "substyle", 2));

                    t_layout.containers["login"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

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

                    t_layout.containers["fields"].Add(new XVar("name", "loginbuttons", "block", "loginbuttons", "substyle", 2));

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


                    t_layout.skins["login"] = "******";

                    t_layout.blocks["top"].Add("login");
                    GlobalVars.page_layouts["login"] = 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(Constants.PAGE_LOGIN, "pageType");
                var_params.InitAndSetArrayItem(Constants.NOT_TABLE_BASED_TNAME, "tName");
                var_params.InitAndSetArrayItem("login.cshtml", "templatefile");
                var_params.InitAndSetArrayItem(false, "needSearchClauseObj");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("value_captcha_1")), "captchaValue");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("notRedirect")), "notRedirect");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("remember_password")), "rememberPassword");
                var_params.InitAndSetArrayItem(LoginPage.readLoginModeFromRequest(), "mode");
                var_params.InitAndSetArrayItem(LoginPage.readActionFromRequest(), "action");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("message")), "message");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("username")), "var_pUsername");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("password")), "var_pPassword");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("return")), "redirectAfterLogin");
                GlobalVars.pageObject = XVar.Clone(new LoginPage((XVar)(var_params)));
                GlobalVars.pageObject.init();
                GlobalVars.pageObject.process();
                ViewBag.xt = xt;
                return(View(xt.GetViewPath()));
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }
Beispiel #6
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;
                Saldo_Horas_Empleado_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  = "Saldo_Horas_Empleado_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["Saldo_Horas_Empleado_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)); }
        }
Beispiel #7
0
        public ActionResult list()
        {
            try
            {
                dynamic i = null, mode = null, options = XVar.Array(), pageObject = null;
                XTempl  xt;
                GlobalVars.requestTable = new XVar("INGRESAR PERMISO");
                GlobalVars.requestPage  = new XVar("list");
                CommonFunctions.add_nocache_headers();
                INGRESAR_PERMISO_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          = "INGRESAR_PERMISO_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["INGRESAR_PERMISO_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)); }
        }
Beispiel #8
0
        public ActionResult detailspreview()
        {
            try
            {
                dynamic         masterKeys = XVar.Array(), mastertable = null, mode = null, pageObject = null, query = null, recordsCounter = null, returnJSON = XVar.Array(), rowcount = null, sessionPrefix = null, var_params = XVar.Array(), whereClauses = XVar.Array();
                ProjectSettings pSet;
                XTempl          xt;
                dbo__ABCVotes_Variables.Apply();
                MVCFunctions.Header("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");
                mode = XVar.Clone(MVCFunctions.postvalue(new XVar("mode")));
                if (XVar.Pack(!(XVar)(CommonFunctions.isLogged())))
                {
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                if (XVar.Pack(!(XVar)(CommonFunctions.CheckSecurity((XVar)(XSession.Session[MVCFunctions.Concat("_", GlobalVars.strTableName, "_OwnerID")]), new XVar("Search")))))
                {
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                GlobalVars.cipherer = XVar.Clone(new RunnerCipherer((XVar)(GlobalVars.strTableName)));
                xt = XVar.UnPackXTempl(new XTempl());
                {
                    TLayout t_layout = null;

                    t_layout                      = new TLayout(new XVar("detailspreview"), new XVar("AvenueAvenue"), new XVar("MobileAvenue"));
                    t_layout.version              = 2;
                    t_layout.blocks["bare"]       = XVar.Array();
                    t_layout.containers["dcount"] = XVar.Array();
                    t_layout.containers["dcount"].Add(new XVar("name", "detailspreviewheader", "block", "", "substyle", 1));

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

                    t_layout.containers["dcount"].Add(new XVar("name", "detailspreviewdispfirst", "block", "display_first", "substyle", 1));

                    t_layout.skins["dcount"] = "empty";

                    t_layout.blocks["bare"].Add("dcount");
                    t_layout.containers["detailspreviewgrid"] = XVar.Array();
                    t_layout.containers["detailspreviewgrid"].Add(new XVar("name", "detailspreviewfields", "block", "details_data", "substyle", 1));

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

                    t_layout.blocks["bare"].Add("detailspreviewgrid");
                    GlobalVars.page_layouts["dbo__ABCVotes_detailspreview"] = 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";
                }

                recordsCounter = new XVar(0);
                mastertable    = XVar.Clone(MVCFunctions.postvalue(new XVar("mastertable")));
                masterKeys     = XVar.Clone(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("masterKeys")))));
                sessionPrefix  = new XVar("_detailsPreview");
                if (mastertable != XVar.Pack(""))
                {
                    dynamic i = null;
                    XSession.Session[MVCFunctions.Concat(sessionPrefix, "_mastertable")] = mastertable;
                    i = new XVar(1);
                    if ((XVar)(MVCFunctions.is_array((XVar)(masterKeys))) && (XVar)(0 < MVCFunctions.count(masterKeys)))
                    {
                        while (XVar.Pack(masterKeys.KeyExists(MVCFunctions.Concat("masterkey", i))))
                        {
                            XSession.Session[MVCFunctions.Concat(sessionPrefix, "_masterkey", i)] = masterKeys[MVCFunctions.Concat("masterkey", i)];
                            i++;
                        }
                    }
                    if (XVar.Pack(XSession.Session.KeyExists(MVCFunctions.Concat(sessionPrefix, "_masterkey", i))))
                    {
                        XSession.Session.Remove(MVCFunctions.Concat(sessionPrefix, "_masterkey", i));
                    }
                }
                else
                {
                    mastertable = XVar.Clone(XSession.Session[MVCFunctions.Concat(sessionPrefix, "_mastertable")]);
                }
                var_params = XVar.Clone(XVar.Array());
                var_params.InitAndSetArrayItem(1, "id");
                var_params.InitAndSetArrayItem(xt, "xt");
                var_params.InitAndSetArrayItem(GlobalVars.strTableName, "tName");
                var_params.InitAndSetArrayItem("detailspreview", "pageType");
                GlobalVars.pageObject = XVar.Clone(new DetailsPreview((XVar)(var_params)));
                pSet         = XVar.UnPackProjectSettings(new ProjectSettings((XVar)(GlobalVars.strTableName), new XVar(Constants.PAGE_LIST)));
                whereClauses = XVar.Clone(XVar.Array());
                if (mastertable == "dbo._ABCReports")
                {
                    dynamic formattedValue = null;
                    formattedValue = XVar.Clone(CommonFunctions.make_db_value(new XVar("record"), (XVar)(XSession.Session[MVCFunctions.Concat(sessionPrefix, "_masterkey1")])));
                    if (formattedValue == "null")
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), " is null"), null);
                    }
                    else
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), "=", formattedValue), null);
                    }
                }
                if (mastertable == "ABC_Voting_Submitted")
                {
                    dynamic formattedValue = null;
                    formattedValue = XVar.Clone(CommonFunctions.make_db_value(new XVar("record"), (XVar)(XSession.Session[MVCFunctions.Concat(sessionPrefix, "_masterkey1")])));
                    if (formattedValue == "null")
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), " is null"), null);
                    }
                    else
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), "=", formattedValue), null);
                    }
                }
                if (mastertable == "ABC_Voting_Recirculated")
                {
                    dynamic formattedValue = null;
                    formattedValue = XVar.Clone(CommonFunctions.make_db_value(new XVar("record"), (XVar)(XSession.Session[MVCFunctions.Concat(sessionPrefix, "_masterkey1")])));
                    if (formattedValue == "null")
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), " is null"), null);
                    }
                    else
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), "=", formattedValue), null);
                    }
                }
                if (mastertable == "ABC_Voting_My_Voting")
                {
                    dynamic formattedValue = null;
                    formattedValue = XVar.Clone(CommonFunctions.make_db_value(new XVar("record"), (XVar)(XSession.Session[MVCFunctions.Concat(sessionPrefix, "_masterkey1")])));
                    if (formattedValue == "null")
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), " is null"), null);
                    }
                    else
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), "=", formattedValue), null);
                    }
                }
                if (mastertable == "dbo.vwABCReportsVoteCount")
                {
                    dynamic formattedValue = null;
                    formattedValue = XVar.Clone(CommonFunctions.make_db_value(new XVar("record"), (XVar)(XSession.Session[MVCFunctions.Concat(sessionPrefix, "_masterkey1")])));
                    if (formattedValue == "null")
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), " is null"), null);
                    }
                    else
                    {
                        whereClauses.InitAndSetArrayItem(MVCFunctions.Concat(GlobalVars.pageObject.getFieldSQLDecrypt(new XVar("record")), "=", formattedValue), null);
                    }
                }
                whereClauses.InitAndSetArrayItem(CommonFunctions.SecuritySQL(new XVar("Search"), (XVar)(GlobalVars.strTableName)), null);
                query             = XVar.Clone(pSet.getSQLQuery());
                GlobalVars.strSQL = XVar.Clone(query.buildSQL_default((XVar)(whereClauses)));
                rowcount          = XVar.Clone(GlobalVars.pageObject.connection.getFetchedRowsNumber((XVar)(GlobalVars.strSQL)));
                GlobalVars.strSQL = MVCFunctions.Concat(GlobalVars.strSQL, GlobalVars.pageObject.getOrderByClause());
                xt.assign(new XVar("row_count"), (XVar)(rowcount));
                if (XVar.Pack(rowcount))
                {
                    dynamic b = null, data = XVar.Array(), display_count = null, format = null, keylink = null, qResult = null, row = XVar.Array(), rowinfo = XVar.Array(), rowinfo2 = XVar.Array(), value = null, var_class = null, viewContainer = null;
                    xt.assign(new XVar("details_data"), new XVar(true));

                    display_count = new XVar(10);
                    if (mode == "inline")
                    {
                        display_count *= 2;
                    }
                    if (display_count + 2 < rowcount)
                    {
                        xt.assign(new XVar("display_first"), new XVar(true));
                        xt.assign(new XVar("display_count"), (XVar)(display_count));
                    }
                    else
                    {
                        display_count = XVar.Clone(rowcount);
                    }
                    rowinfo       = XVar.Clone(XVar.Array());
                    viewContainer = XVar.Clone(new ViewControlsContainer((XVar)(pSet), new XVar(Constants.PAGE_LIST)));
                    viewContainer.isDetailsPreview = new XVar(true);
                    b       = new XVar(true);
                    qResult = XVar.Clone(GlobalVars.pageObject.connection.query((XVar)(GlobalVars.strSQL)));
                    data    = XVar.Clone(GlobalVars.cipherer.DecryptFetchedArray((XVar)(qResult.fetchAssoc())));
                    while ((XVar)(data) && (XVar)(recordsCounter < display_count))
                    {
                        recordsCounter++;
                        row     = XVar.Clone(XVar.Array());
                        keylink = new XVar("");
                        keylink = MVCFunctions.Concat(keylink, "&key1=", MVCFunctions.runner_htmlspecialchars((XVar)(MVCFunctions.RawUrlEncode((XVar)(data["id"])))));
                        keylink = MVCFunctions.Concat(keylink, "&key2=", MVCFunctions.runner_htmlspecialchars((XVar)(MVCFunctions.RawUrlEncode((XVar)(data["record"])))));

                        viewContainer.recId = XVar.Clone(recordsCounter);
                        value = XVar.Clone(viewContainer.showDBValue(new XVar("committee_member"), (XVar)(data), (XVar)(keylink)));
                        row.InitAndSetArrayItem(value, "committee_member_value");
                        format    = XVar.Clone(pSet.getViewFormat(new XVar("committee_member")));
                        var_class = new XVar("rnr-field-text");
                        if (format == Constants.FORMAT_FILE)
                        {
                            var_class = new XVar(" rnr-field-file");
                        }
                        if (format == Constants.FORMAT_AUDIO)
                        {
                            var_class = new XVar(" rnr-field-audio");
                        }
                        if (format == Constants.FORMAT_CHECKBOX)
                        {
                            var_class = new XVar(" rnr-field-checkbox");
                        }
                        if ((XVar)(format == Constants.FORMAT_NUMBER) || (XVar)(CommonFunctions.IsNumberType((XVar)(pSet.getFieldType(new XVar("committee_member"))))))
                        {
                            var_class = new XVar(" rnr-field-number");
                        }
                        row.InitAndSetArrayItem(var_class, "committee_member_class");
                        viewContainer.recId = XVar.Clone(recordsCounter);
                        value = XVar.Clone(viewContainer.showDBValue(new XVar("date_voted"), (XVar)(data), (XVar)(keylink)));
                        row.InitAndSetArrayItem(value, "date_voted_value");
                        format    = XVar.Clone(pSet.getViewFormat(new XVar("date_voted")));
                        var_class = new XVar("rnr-field-text");
                        if (format == Constants.FORMAT_FILE)
                        {
                            var_class = new XVar(" rnr-field-file");
                        }
                        if (format == Constants.FORMAT_AUDIO)
                        {
                            var_class = new XVar(" rnr-field-audio");
                        }
                        if (format == Constants.FORMAT_CHECKBOX)
                        {
                            var_class = new XVar(" rnr-field-checkbox");
                        }
                        if ((XVar)(format == Constants.FORMAT_NUMBER) || (XVar)(CommonFunctions.IsNumberType((XVar)(pSet.getFieldType(new XVar("date_voted"))))))
                        {
                            var_class = new XVar(" rnr-field-number");
                        }
                        row.InitAndSetArrayItem(var_class, "date_voted_class");
                        viewContainer.recId = XVar.Clone(recordsCounter);
                        value = XVar.Clone(viewContainer.showDBValue(new XVar("vote"), (XVar)(data), (XVar)(keylink)));
                        row.InitAndSetArrayItem(value, "vote_value");
                        format    = XVar.Clone(pSet.getViewFormat(new XVar("vote")));
                        var_class = new XVar("rnr-field-text");
                        if (format == Constants.FORMAT_FILE)
                        {
                            var_class = new XVar(" rnr-field-file");
                        }
                        if (format == Constants.FORMAT_AUDIO)
                        {
                            var_class = new XVar(" rnr-field-audio");
                        }
                        if (format == Constants.FORMAT_CHECKBOX)
                        {
                            var_class = new XVar(" rnr-field-checkbox");
                        }
                        if ((XVar)(format == Constants.FORMAT_NUMBER) || (XVar)(CommonFunctions.IsNumberType((XVar)(pSet.getFieldType(new XVar("vote"))))))
                        {
                            var_class = new XVar(" rnr-field-number");
                        }
                        row.InitAndSetArrayItem(var_class, "vote_class");
                        viewContainer.recId = XVar.Clone(recordsCounter);
                        value = XVar.Clone(viewContainer.showDBValue(new XVar("comment"), (XVar)(data), (XVar)(keylink)));
                        row.InitAndSetArrayItem(value, "comment_value");
                        format    = XVar.Clone(pSet.getViewFormat(new XVar("comment")));
                        var_class = new XVar("rnr-field-text");
                        if (format == Constants.FORMAT_FILE)
                        {
                            var_class = new XVar(" rnr-field-file");
                        }
                        if (format == Constants.FORMAT_AUDIO)
                        {
                            var_class = new XVar(" rnr-field-audio");
                        }
                        if (format == Constants.FORMAT_CHECKBOX)
                        {
                            var_class = new XVar(" rnr-field-checkbox");
                        }
                        if ((XVar)(format == Constants.FORMAT_NUMBER) || (XVar)(CommonFunctions.IsNumberType((XVar)(pSet.getFieldType(new XVar("comment"))))))
                        {
                            var_class = new XVar(" rnr-field-number");
                        }
                        row.InitAndSetArrayItem(var_class, "comment_class");
                        rowinfo.InitAndSetArrayItem(row, null);
                        if (XVar.Pack(b))
                        {
                            rowinfo2.InitAndSetArrayItem(row, null);
                            b = new XVar(false);
                        }
                        data = XVar.Clone(GlobalVars.cipherer.DecryptFetchedArray((XVar)(qResult.fetchAssoc())));
                    }
                    xt.assign_loopsection(new XVar("details_row"), (XVar)(rowinfo));
                    xt.assign_loopsection(new XVar("details_row_header"), (XVar)(rowinfo2));
                }
                returnJSON = XVar.Clone(new XVar("success", true));
                xt.load_template((XVar)(MVCFunctions.GetTemplateName(new XVar("dbo__ABCVotes"), new XVar("detailspreview"))));
                returnJSON.InitAndSetArrayItem(xt.fetch_loaded(), "body");
                if (mode != "inline")
                {
                    dynamic layout = null;
                    returnJSON.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("counter")), "counter");
                    layout = XVar.Clone(CommonFunctions.GetPageLayout((XVar)(MVCFunctions.GoodFieldName((XVar)(GlobalVars.strTableName))), new XVar("detailspreview")));
                    if (XVar.Pack(layout))
                    {
                        foreach (KeyValuePair <XVar, dynamic> css in layout.getCSSFiles((XVar)(CommonFunctions.isRTL()), (XVar)((XVar)(CommonFunctions.mobileDeviceDetected()) && (XVar)(layout.version != Constants.BOOTSTRAP_LAYOUT))).GetEnumerator())
                        {
                            returnJSON.InitAndSetArrayItem(css.Value, "CSSFiles", null);
                        }
                    }
                }
                MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(returnJSON)));
                MVCFunctions.Echo(new XVar(""));
                return(MVCFunctions.GetBuferContentAndClearBufer());
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }
Beispiel #9
0
        public ActionResult menu()
        {
            try
            {
                dynamic id = null, pageObject = null, redirect = null, var_params = XVar.Array();
                XTempl  xt;
                Security.processLogoutRequest();
                if (XVar.Pack(!(XVar)(CommonFunctions.isLogged())))
                {
                    MVCFunctions.HeaderRedirect(new XVar("login"));
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                if ((XVar)(XSession.Session["MyURL"] == "") || (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest())))
                {
                    Security.saveRedirectURL();
                }
                {
                    TLayout t_layout = null;

                    t_layout                    = new TLayout(new XVar("menu2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue"));
                    t_layout.version            = 2;
                    t_layout.blocks["top"]      = XVar.Array();
                    t_layout.containers["menu"] = XVar.Array();
                    t_layout.containers["menu"].Add(new XVar("name", "login_menu", "block", "loggedas_block", "substyle", 2));

                    t_layout.containers["menu"].Add(new XVar("name", "vmenu", "block", "menu_block", "substyle", 1));

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

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

                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_dbo__ABCVotes(), "dbo._ABCVotes");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_ABC_Voting_My_Voting(), "ABC_Voting_My_Voting");
                xt         = XVar.UnPackXTempl(new XTempl());
                id         = XVar.Clone((XVar.Pack(!XVar.Equals(XVar.Pack(MVCFunctions.postvalue(new XVar("id"))), XVar.Pack(""))) ? XVar.Pack(MVCFunctions.postvalue(new XVar("id"))) : XVar.Pack(1)));
                var_params = XVar.Clone(XVar.Array());
                var_params.InitAndSetArrayItem(id, "id");
                var_params.InitAndSetArrayItem(xt, "xt");
                var_params.InitAndSetArrayItem(Constants.NOT_TABLE_BASED_TNAME, "tName");
                var_params.InitAndSetArrayItem(Constants.PAGE_MENU, "pageType");
                var_params.InitAndSetArrayItem("menu.cshtml", "templatefile");
                var_params.InitAndSetArrayItem(GlobalVars.isGroupSecurity, "isGroupSecurity");
                var_params.InitAndSetArrayItem(false, "needSearchClauseObj");
                GlobalVars.pageObject = XVar.Clone(new RunnerPage((XVar)(var_params)));
                GlobalVars.pageObject.init();
                GlobalVars.pageObject.commonAssign();
                if (XVar.Pack(GlobalVars.globalEvents.exists(new XVar("BeforeProcessMenu"))))
                {
                    GlobalVars.globalEvents.BeforeProcessMenu((XVar)(GlobalVars.pageObject));
                }
                GlobalVars.pageObject.body["begin"] = MVCFunctions.Concat(GlobalVars.pageObject.body["begin"], CommonFunctions.GetBaseScriptsForPage(new XVar(false)));
                GlobalVars.pageObject.addCommonJs();
                GlobalVars.pageObject.fillSetCntrlMaps();
                GlobalVars.pageObject.setLangParams();
                xt.assign(new XVar("id"), (XVar)(id));
                xt.assign(new XVar("username"), (XVar)(XSession.Session["UserName"]));
                xt.assign(new XVar("changepwd_link"), (XVar)((XVar)(XSession.Session["AccessLevel"] != Constants.ACCESS_LEVEL_GUEST) && (XVar)(XSession.Session["fromFacebook"] == false)));
                xt.assign(new XVar("changepwdlink_attrs"), (XVar)(MVCFunctions.Concat("onclick=\"window.location.href='", MVCFunctions.GetTableLink(new XVar("changepwd")), "';return false;\"")));
                xt.assign(new XVar("logoutlink_attrs"), (XVar)(MVCFunctions.Concat("id=\"logoutButton", id, "\"")));
                xt.assign(new XVar("guestloginlink_attrs"), (XVar)(MVCFunctions.Concat("id=\"loginButton", id, "\"")));
                xt.assign(new XVar("loggedas_block"), (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest())));
                xt.assign(new XVar("loggedas_message"), (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest())));
                xt.assign(new XVar("logout_link"), new XVar(true));
                xt.assign(new XVar("guestloginbutton"), (XVar)(CommonFunctions.isLoggedAsGuest()));
                xt.assign(new XVar("logoutbutton"), (XVar)((XVar)(CommonFunctions.isSingleSign()) && (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest()))));
                redirect = XVar.Clone(GlobalVars.pageObject.getRedirectForMenuPage());
                if (XVar.Pack(redirect))
                {
                    MVCFunctions.HeaderRedirect((XVar)(MVCFunctions.Concat("", redirect)));
                    MVCFunctions.Echo(new XVar(""));
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                xt.assign(new XVar("menu_block"), new XVar(true));
                if (XVar.Pack(GlobalVars.globalEvents.exists(new XVar("BeforeShowMenu"))))
                {
                    new Func <XVar>(() => { var GlobalVars_pageObject_templatefile_byref = GlobalVars.pageObject.templatefile; var result = GlobalVars.globalEvents.BeforeShowMenu((XVar)(xt), ref GlobalVars_pageObject_templatefile_byref, (XVar)(GlobalVars.pageObject)); GlobalVars.pageObject.templatefile = GlobalVars_pageObject_templatefile_byref; return(result); }).Invoke();
                }
                GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "<script>");
                GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "window.controlsMap = ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pageObject.controlsHTMLMap)), ";");
                GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "window.viewControlsMap = ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pageObject.viewControlsHTMLMap)), ";");
                GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "Runner.applyPagesData( ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pagesData)), " );");
                GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "window.settings = ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pageObject.jsSettings)), ";</script>");
                GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "<script type=\"text/javascript\" src=\"", MVCFunctions.GetRootPathForResources(new XVar("include/runnerJS/RunnerAll.js")), "\"></script>");
                GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "<script>", GlobalVars.pageObject.PrepareJS(), "</script>");
                xt.assignbyref(new XVar("body"), (XVar)(GlobalVars.pageObject.body));
                GlobalVars.pageObject.display((XVar)(GlobalVars.pageObject.templatefile));
                ViewBag.xt = xt;
                return(View(xt.GetViewPath()));
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }
Beispiel #10
0
        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)); }
        }
Beispiel #11
0
        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)); }
        }
Beispiel #12
0
        public ActionResult view()
        {
            try
            {
                dynamic keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                dbo__ABCReports_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.containers["all"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "details"));
                    t_layout.containers["details"] = XVar.Array();
                    t_layout.containers["details"].Add(new XVar("name", "viewdetails", "block", "detail_tables", "substyle", 1));

                    t_layout.skins["details"] = "empty";


                    t_layout.skins["all"] = "empty";

                    t_layout.blocks["top"].Add("all");
                    GlobalVars.page_layouts["dbo__ABCReports_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";
                }


                {
                    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.containers["master"] = XVar.Array();
                    t_layout.containers["master"].Add(new XVar("name", "masterinfo", "block", "mastertable_block", "substyle", 1));

                    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["dbo__ABCVotes_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(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)); }
        }
Beispiel #13
0
        public ActionResult login()
        {
            try
            {
                dynamic pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                CommonFunctions.add_nocache_headers();
                {
                    TLayout t_layout = null;

                    t_layout                    = new TLayout(new XVar("login_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version            = 3;
                    t_layout.bootstrapTheme     = "default";
                    t_layout.customCssPageName  = "_login";
                    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", "loginheader", "block", "loginheader", "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", "header_1"));
                    t_layout.containers["header_1"] = XVar.Array();
                    t_layout.containers["header_1"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

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


                    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", "loginfields", "block", "", "substyle", 1));

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


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

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


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

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


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


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


                    t_layout.containers["page_1"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "register"));
                    t_layout.containers["register"] = XVar.Array();
                    t_layout.containers["register"].Add(new XVar("name", "bsloginregister", "block", "", "substyle", 1));

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


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


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

                    t_layout.blocks["top"].Add("page");
                    GlobalVars.page_layouts["login"] = 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_LOGIN, "pageType");
                var_params.InitAndSetArrayItem(Constants.GLOBAL_PAGES, "pageTable");
                var_params.InitAndSetArrayItem(false, "needSearchClauseObj");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("value_captcha_1")), "captchaValue");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("notRedirect")), "notRedirect");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("remember_password")), "rememberPassword");
                var_params.InitAndSetArrayItem(LoginPage.readLoginModeFromRequest(), "mode");
                var_params.InitAndSetArrayItem(LoginPage.readActionFromRequest(), "action");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("message")), "message");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("username")), "var_pUsername");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("password")), "var_pPassword");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("return")), "redirectAfterLogin");
                var_params.InitAndSetArrayItem(GlobalVars.cLoginTable, "tName");
                GlobalVars.pageObject = XVar.Clone(new LoginPage((XVar)(var_params)));
                GlobalVars.pageObject.init();
                GlobalVars.pageObject.process();
                ViewBag.xt = xt;
                return(View(xt.GetViewPath()));
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }
Beispiel #14
0
        public ActionResult list()
        {
            try
            {
                dynamic options = XVar.Array(), pageObject = null;
                XTempl  xt;
                MVCFunctions.Header("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");
                admin_members_Variables.Apply();
                if (XVar.Pack(!(XVar)(Security.processAdminPageSecurity(new XVar(false)))))
                {
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                {
                    TLayout t_layout = null;

                    t_layout                   = new TLayout(new XVar("admin_members_list_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version           = 3;
                    t_layout.bootstrapTheme    = "default";
                    t_layout.customCssPageName = "_admin_members_list";
                    t_layout.blocks["top"]     = XVar.Array();
                    t_layout.containers["top"] = XVar.Array();
                    t_layout.containers["top"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "menu"));
                    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.containers["top"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "breadcrumbs"));
                    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.containers["top"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "messagerow"));
                    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.containers["top"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "ugcontrols"));
                    t_layout.containers["ugcontrols"] = XVar.Array();
                    t_layout.containers["ugcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "save"));
                    t_layout.containers["save"] = XVar.Array();
                    t_layout.containers["save"].Add(new XVar("name", "ugbuttons", "block", "", "substyle", 1));

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


                    t_layout.containers["ugcontrols"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "filter"));
                    t_layout.containers["filter"] = XVar.Array();
                    t_layout.containers["filter"].Add(new XVar("name", "ugmembersbuttons", "block", "", "substyle", 1));

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


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


                    t_layout.containers["top"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "permgrid"));
                    t_layout.containers["permgrid"] = XVar.Array();
                    t_layout.containers["permgrid"].Add(new XVar("name", "ugmemgrid", "block", "grid_block", "substyle", 1));

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


                    t_layout.containers["top"].Add(new XVar("name", "wrapper", "block", "", "substyle", 1, "container", "pagination"));
                    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.skins["top"] = "";

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

                xt      = XVar.UnPackXTempl(new XTempl());
                options = XVar.Clone(XVar.Array());
                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(Constants.MEMBERS_PAGE, "mode");
                options.InitAndSetArrayItem(xt, "xt");
                GlobalVars.pageObject = XVar.Clone(ListPage.createListPage((XVar)(GlobalVars.strTableName), (XVar)(options)));
                if (MVCFunctions.postvalue(new XVar("a")) == "saveMembers")
                {
                    dynamic modifiedMembers = null;
                    modifiedMembers = XVar.Clone(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("values")))));
                    GlobalVars.pageObject.saveMembers((XVar)(modifiedMembers));
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                GlobalVars.pageObject.prepareForBuildPage();
                GlobalVars.pageObject.showPage();
                ViewBag.xt = xt;
                return(View(xt.GetViewPath()));
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }
Beispiel #15
0
        public ActionResult list()
        {
            try
            {
                dynamic i = null, mode = null, options = XVar.Array(), pageObject = null;
                XTempl  xt;
                ABC_Voting_Batch_Create_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", "recordcontrol", "block", "record_controls_block", "substyle", 1));

                    t_layout.skins["recordcontrols"] = "2";

                    t_layout.blocks["top"].Add("recordcontrols");
                    GlobalVars.page_layouts["ABC_Voting_Batch_Create_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)); }
        }
Beispiel #16
0
        public ActionResult add()
        {
            try
            {
                dynamic id = null, pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                dbo__ABCSecurity_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", "master"));
                    t_layout.containers["master"] = XVar.Array();
                    t_layout.containers["master"].Add(new XVar("name", "masterinfo", "block", "mastertable_block", "substyle", 1));

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


                    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["dbo__ABCSecurity_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.containers["master"] = XVar.Array();
                    t_layout.containers["master"].Add(new XVar("name", "masterinfo", "block", "mastertable_block", "substyle", 1));

                    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["dbo__ABCSecurity_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)); }
        }
Beispiel #17
0
        public ActionResult add()
        {
            try
            {
                dynamic id = null, pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                dbo_ESTADO_PERSONALES_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      = "dbo_ESTADO_PERSONALES_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["dbo_ESTADO_PERSONALES_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          = "dbo_ESTADO_PERSONALES_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["dbo_ESTADO_PERSONALES_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)); }
        }
Beispiel #18
0
        public ActionResult view()
        {
            try
            {
                dynamic keys = XVar.Array(), pageMode = null, pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                APROBAR_COMPESADOS_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      = "APROBAR_COMPESADOS_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["APROBAR_COMPESADOS_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_compesados");
                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)); }
        }
Beispiel #19
0
        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)); }
        }
Beispiel #20
0
        public ActionResult changepwd()
        {
            try
            {
                dynamic pageObject = null, token = null, var_params = XVar.Array();
                XTempl  xt;
                token = XVar.Clone(MVCFunctions.postvalue(new XVar("token")));
                if ((XVar)(!(XVar)(token)) && (XVar)((XVar)(!(XVar)(CommonFunctions.isLogged())) || (XVar)(XSession.Session["UserID"] == "<Guest>")))
                {
                    Security.saveRedirectURL();
                    MVCFunctions.HeaderRedirect(new XVar("login"), new XVar(""), new XVar("message=expired"));
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                {
                    TLayout t_layout = null;

                    t_layout                    = new TLayout(new XVar("changepwd_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version            = 3;
                    t_layout.bootstrapTheme     = "default";
                    t_layout.customCssPageName  = "_changepwd";
                    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", "changeheader", "block", "changeheader", "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", "header_1"));
                    t_layout.containers["header_1"] = XVar.Array();
                    t_layout.containers["header_1"].Add(new XVar("name", "message", "block", "message_block", "substyle", 1));

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


                    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", "changefields", "block", "", "substyle", 1));

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


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

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


                    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["changepwd"] = t_layout;
                }

                {
                    TLayout t_layout = null;

                    t_layout                    = new TLayout(new XVar("changepwd_success_bootstrap"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version            = 3;
                    t_layout.bootstrapTheme     = "default";
                    t_layout.customCssPageName  = "_changepwd_success";
                    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", "changeheader", "block", "changeheader", "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", "header_1"));
                    t_layout.containers["header_1"] = XVar.Array();
                    t_layout.containers["header_1"].Add(new XVar("name", "changepwd_message", "block", "", "substyle", 1));

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


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

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


                    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["changepwd_success"] = t_layout;
                }

                xt         = XVar.UnPackXTempl(new XTempl());
                var_params = XVar.Clone(XVar.Array());
                var_params.InitAndSetArrayItem(xt, "xt");
                var_params.InitAndSetArrayItem(token, "token");
                var_params.InitAndSetArrayItem(CommonFunctions.postvalue_number(new XVar("id")), "id");
                var_params.InitAndSetArrayItem(GlobalVars.cLoginTable, "tName");
                var_params.InitAndSetArrayItem(Constants.GLOBAL_PAGES, "pageTable");
                var_params.InitAndSetArrayItem(Constants.PAGE_CHANGEPASS, "pageType");
                var_params.InitAndSetArrayItem(false, "needSearchClauseObj");
                var_params.InitAndSetArrayItem(ChangePasswordPage.readActionFromRequest(), "action");
                GlobalVars.pageObject = XVar.Clone(new ChangePasswordPage((XVar)(var_params)));
                GlobalVars.pageObject.init();
                GlobalVars.pageObject.process();
                ViewBag.xt = xt;
                return(View(xt.GetViewPath()));
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }
Beispiel #21
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();
                dbo_GRUPOS_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        = "dbo_GRUPOS_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["dbo_GRUPOS_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("dbo_GRUPOS", "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)); }
        }
Beispiel #22
0
        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;
                dbo__ABCReports_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["dbo__ABCReports_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("dbo__ABCReports", "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)); }
        }
Beispiel #23
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");
                admin_users_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  = "admin_users_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["admin_users_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)); }
        }
Beispiel #24
0
        public ActionResult menu()
        {
            try
            {
                dynamic pageObject = null, var_params = XVar.Array();
                XTempl  xt;
                Security.processLogoutRequest();
                if (XVar.Pack(!(XVar)(CommonFunctions.isLogged())))
                {
                    MVCFunctions.HeaderRedirect(new XVar("login"));
                    return(MVCFunctions.GetBuferContentAndClearBufer());
                }
                if ((XVar)(XSession.Session["MyURL"] == "") || (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest())))
                {
                    Security.saveRedirectURL();
                }
                {
                    TLayout t_layout = null;

                    t_layout                    = new TLayout(new XVar("menu_bootstrap1"), new XVar("OfficeOffice"), new XVar("MobileOffice"));
                    t_layout.version            = 3;
                    t_layout.bootstrapTheme     = "default";
                    t_layout.customCssPageName  = "_menu";
                    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", "login"));
                    t_layout.containers["login"] = XVar.Array();
                    t_layout.containers["login"].Add(new XVar("name", "morebutton", "block", "more_list", "substyle", 1));

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

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


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


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

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

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

                    t_layout.blocks["top"].Add("center");
                    GlobalVars.page_layouts["menu"] = t_layout;
                }

                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_dbo_Permisos2(), "dbo.Permisos2");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_dbo_REGISTRO_HORAS_COMPESADAS(), "dbo.REGISTRO_HORAS_COMPESADAS");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_APROBAR_PERMISOS(), "APROBAR_PERMISOS");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_VISTOBUENO_JEFEINMEDIATO(), "VISTOBUENO_JEFEINMEDIATO");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_VISTOBUENO_JEFEDEPARTAMENTO(), "VISTOBUENO_JEFEDEPARTAMENTO");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_VER_PERMISOS(), "VER_PERMISOS");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_APROBACION_COMPESADOS_JEFEINMEDIATO(), "APROBACION_COMPESADOS_JEFEINMEDIATO");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_APROBACION_COMPESADOS_JEFEDEPARTAMENTO(), "APROBACION_COMPESADOS_JEFEDEPARTAMENTO");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_APROBAR_COMPESADOS(), "APROBAR_COMPESADOS");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_INGRESAR_PERMISO(), "INGRESAR PERMISO");
                GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_INGRESAR_COMPESADO(), "INGRESAR_COMPESADO");
                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.GLOBAL_PAGES, "tName");
                var_params.InitAndSetArrayItem(Constants.PAGE_MENU, "pageType");
                var_params.InitAndSetArrayItem(GlobalVars.isGroupSecurity, "isGroupSecurity");
                var_params.InitAndSetArrayItem(false, "needSearchClauseObj");
                var_params.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("page")), "pageName");
                GlobalVars.pageObject = XVar.Clone(new MenuPage((XVar)(var_params)));
                GlobalVars.pageObject.init();
                GlobalVars.pageObject.process();
                ViewBag.xt = xt;
                return(View(xt.GetViewPath()));
            }
            catch (RunnerRedirectException ex)
            { return(Redirect(ex.Message)); }
        }