Пример #1
0
 public XVar imager()
 {
     try
     {
         dynamic file = null, pdf = null, table = null, var_params = XVar.Array();
         table = XVar.Clone((XVar.Pack(pdf as object != null) ? XVar.Pack(var_params["table"]) : XVar.Pack(MVCFunctions.postvalue(new XVar("table")))));
         if (XVar.Pack(!(XVar)(CommonFunctions.checkTableName((XVar)(table)))))
         {
             MVCFunctions.Echo(new XVar(0));
             return(MVCFunctions.GetBuferContentAndClearBufer());
         }
         Assembly.GetExecutingAssembly().GetType(MVCFunctions.Concat("runnerDotNet.", MVCFunctions.Concat("", table, ""),
                                                                     "_Variables")).InvokeMember("Apply", BindingFlags.InvokeMethod, null, null, null);
         if (XVar.Pack(!(XVar)(GlobalVars.gQuery as object != null)))
         {
             if (XVar.Pack(!(XVar)(GlobalVars.gSettings as object != null)))
             {
                 GlobalVars.gSettings = XVar.Clone(new ProjectSettings((XVar)(CommonFunctions.GetTableByShort((XVar)(table)))));
             }
             GlobalVars.gQuery = XVar.Clone(GlobalVars.gSettings.getSQLQuery());
         }
         file = XVar.Clone(CommonFunctions.GetImageFromDB((XVar)(GlobalVars.gQuery), (XVar)(pdf as object != null), (XVar)((XVar.Pack(var_params as object != null) ? XVar.Pack(var_params) : XVar.Pack(XVar.Array())))));
         return(MVCFunctions.GetBuferContentAndClearBufer());
     }
     catch (RunnerRedirectException ex)
     { return(Redirect(ex.Message)); }
 }
Пример #2
0
        protected virtual XVar reportSecondAuthStepResult(dynamic _param_verified)
        {
            #region pass-by-value parameters
            dynamic verified = XVar.Clone(_param_verified);
            #endregion

            dynamic returnJSON = XVar.Array();
            returnJSON = XVar.Clone(XVar.Array());
            returnJSON.InitAndSetArrayItem(verified, "success");
            returnJSON.InitAndSetArrayItem(this.skipSecondStep, "secondStepSkipped");
            if (XVar.Pack(!(XVar)(verified)))
            {
                returnJSON.InitAndSetArrayItem("Wrong code", "message");
            }
            else
            {
                if (this.mode == Constants.LOGIN_POPUP)
                {
                    returnJSON.InitAndSetArrayItem("You have successfully logged in.", "message");
                }
                returnJSON.InitAndSetArrayItem(getLoggedInRedirectUrl(), "redirect");
                if (XVar.Pack(this.notRedirect))
                {
                    this.body["begin"] = MVCFunctions.Concat(this.body["begin"], "<input type=hidden id='notRedirect' value=1>");
                    this.xt.assign(new XVar("continuebutton_attrs"), new XVar("href=\"#\" id=\"continueButton\""));
                    this.xt.assign(new XVar("continue_button"), new XVar(true));
                    returnJSON.InitAndSetArrayItem(this.xt.fetch_loaded(new XVar("continue_button")), "loginbuttons");
                }
            }
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(returnJSON)));
            MVCFunctions.ob_flush();
            HttpContext.Current.Response.End();
            throw new RunnerInlineOutputException();
            return(null);
        }
Пример #3
0
 public virtual XVar showDetailPrint()
 {
     this.xt.hideAllBricksExcept((XVar)(new XVar(0, "grid")));
     this.xt.assign(new XVar("grid_block"), new XVar(true));
     this.xt.load_template((XVar)(this.templatefile));
     if (XVar.Pack(isPD()))
     {
         MVCFunctions.Echo(MVCFunctions.Concat("<div class=\"panel panel-info details-grid\">\r\n\t\t\t\t<div class=\"panel-heading\">\r\n\t\t\t\t\t<h4 class=\"panel-title\">", getPageTitle((XVar)(this.pageType), (XVar)(MVCFunctions.GoodFieldName((XVar)(this.tName)))), "</h4>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"panel-body\">"));
         MVCFunctions.Echo(fetchForms((XVar)(new XVar(0, "grid"))));
         MVCFunctions.Echo("</div>\r\n\t\t\t</div>");
     }
     else
     {
         MVCFunctions.Echo("<div class='rnr-print-details'>");
         if (XVar.Pack(this.multipleDetails))
         {
             MVCFunctions.Echo("<div class='rnr-pd-title'>");
             MVCFunctions.Echo(getPageTitle((XVar)(this.pageType), (XVar)(MVCFunctions.GoodFieldName((XVar)(this.tName)))));
             MVCFunctions.Echo("</div>");
         }
         MVCFunctions.Echo("<div class='rnr-pd-grid'>");
         MVCFunctions.Echo(this.xt.fetch_loaded(new XVar("container_grid")));
         MVCFunctions.Echo("</div>");
         MVCFunctions.Echo("</div>");
     }
     return(null);
 }
Пример #4
0
        public override XVar process()
        {
            dynamic extraParams = XVar.Array(), forExport = null;

            displayMasterTableInfo();
            assignPDFFormatSettings();
            forExport = new XVar(false);
            if (this.format == "excel")
            {
                forExport = new XVar("excel");
                MVCFunctions.Header("Content-Type", "application/vnd.ms-excel");
                MVCFunctions.Header((XVar)(MVCFunctions.Concat("Content-Disposition: attachment;Filename=", this.shortTableName, ".xls")));
                MVCFunctions.Echo("<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns=\"http://www.w3.org/TR/REC-html40\">");
                MVCFunctions.Echo(MVCFunctions.Concat("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=", GlobalVars.cCharset, "\">"));
            }
            else
            {
                if (this.format == "word")
                {
                    forExport = new XVar("word");
                    MVCFunctions.Header("Content-Type", "application/vnd.ms-word");
                    MVCFunctions.Header((XVar)(MVCFunctions.Concat("Content-Disposition: attachment;Filename=", this.shortTableName, ".doc")));
                    MVCFunctions.Echo(MVCFunctions.Concat("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=", GlobalVars.cCharset, "\">"));
                }
            }
            doCommonAssignments();
            extraParams = XVar.Clone(getExtraReportParams());
            setGoogleMapsParams((XVar)(extraParams["fieldsArr"]));
            setReportData((XVar)(extraParams));
            addButtonHandlers();
            addCommonJs();
            showPage();
            return(null);
        }
Пример #5
0
        public virtual XVar displaySearchControl()
        {
            dynamic ctrlBlockArr = XVar.Array(), defaultValue = null, resArr = XVar.Array();

            this.searchControlBuilder = XVar.Clone(new PanelSearchControl((XVar)(this.searchControllerId), (XVar)(this.tName), (XVar)(this.searchClauseObj), this));
            defaultValue = XVar.Clone(this.pSet.getDefaultValue((XVar)(this.ctrlField)));
            ctrlBlockArr = XVar.Clone(this.searchControlBuilder.buildSearchCtrlBlockArr((XVar)(this.id), (XVar)(this.ctrlField), new XVar(0), new XVar(""), new XVar(false), new XVar(true), (XVar)(defaultValue), new XVar("")));
            resArr       = XVar.Clone(XVar.Array());
            resArr.InitAndSetArrayItem(MVCFunctions.trim((XVar)(this.xt.call_func((XVar)(ctrlBlockArr["searchcontrol"])))), "control1");
            resArr.InitAndSetArrayItem(MVCFunctions.trim((XVar)(this.xt.call_func((XVar)(ctrlBlockArr["searchcontrol1"])))), "control2");
            resArr.InitAndSetArrayItem(MVCFunctions.trim((XVar)(ctrlBlockArr["searchtype"])), "comboHtml");
            resArr.InitAndSetArrayItem(MVCFunctions.trim((XVar)(ctrlBlockArr["delCtrlButt"])), "delButt");
            resArr.InitAndSetArrayItem(MVCFunctions.trim((XVar)(this.searchControlBuilder.getDelButtonId((XVar)(this.ctrlField), (XVar)(this.id)))), "delButtId");
            resArr.InitAndSetArrayItem(MVCFunctions.trim((XVar)(this.id)), "divInd");
            resArr.InitAndSetArrayItem(CommonFunctions.GetFieldLabel((XVar)(MVCFunctions.GoodFieldName((XVar)(this.tName))), (XVar)(MVCFunctions.GoodFieldName((XVar)(this.ctrlField)))), "fLabel");
            resArr.InitAndSetArrayItem(this.controlsMap["controls"], "ctrlMap");
            if (this.needSettings == "true")
            {
                fillSettings();
                resArr.InitAndSetArrayItem(this.jsSettings, "settings");
            }
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(resArr)));
            MVCFunctions.ob_flush();
            HttpContext.Current.Response.End();
            throw new RunnerInlineOutputException();
            return(null);
        }
Пример #6
0
        public virtual XVar showPageAjax()
        {
            dynamic proceedLink = null, returnJSON = XVar.Array();

            returnJSON  = XVar.Clone(XVar.Array());
            proceedLink = XVar.Clone(getProceedLink());
            if ((XVar)((XVar)((XVar)((XVar)((XVar)(!(XVar)(this.numRowsFromSQL)) && (XVar)(!(XVar)(addAvailable()))) && (XVar)(!(XVar)(inlineAddAvailable()))) && (XVar)(!(XVar)(this.recordsDeleted))) && (XVar)(proceedLink == XVar.Pack(""))) && (XVar)(getGridTabsCount() == 0))
            {
                returnJSON.InitAndSetArrayItem(false, "success");
                MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(returnJSON)));
                return(null);
            }
            addControlsJSAndCSS();
            fillSetCntrlMaps();
            returnJSON.InitAndSetArrayItem(GlobalVars.pagesData, "pagesData");
            returnJSON.InitAndSetArrayItem(this.controlsHTMLMap, "controlsMap");
            returnJSON.InitAndSetArrayItem(this.viewControlsHTMLMap, "viewControlsMap");
            returnJSON.InitAndSetArrayItem(this.jsSettings, "settings");
            this.xt.assign(new XVar("header"), new XVar(false));
            this.xt.assign(new XVar("footer"), new XVar(false));
            returnJSON.InitAndSetArrayItem(MVCFunctions.Concat(proceedLink, getHeaderControlsBlocks()), "headerCont");
            if (XVar.Pack(this.formBricks["footer"]))
            {
                returnJSON.InitAndSetArrayItem(fetchBlocksList((XVar)(this.formBricks["footer"]), new XVar(true)), "footerCont");
            }
            assignFormFooterAndHeaderBricks(new XVar(false));
            this.xt.prepareContainers();
            returnJSON.InitAndSetArrayItem(this.xt.fetch_loaded(new XVar("body")), "html");
            returnJSON.InitAndSetArrayItem(this.flyId, "idStartFrom");
            returnJSON.InitAndSetArrayItem(true, "success");
            returnJSON.InitAndSetArrayItem(grabAllJsFiles(), "additionalJS");
            returnJSON.InitAndSetArrayItem(grabAllCSSFiles(), "CSSFiles");
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(returnJSON)));
            return(null);
        }
Пример #7
0
        public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data)
        {
            #region pass-by-value parameters
            dynamic value                = XVar.Clone(_param_value);
            dynamic mode                 = XVar.Clone(_param_mode);
            dynamic fieldNum             = XVar.Clone(_param_fieldNum);
            dynamic validate             = XVar.Clone(_param_validate);
            dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams);
            dynamic data                 = XVar.Clone(_param_data);
            #endregion

            dynamic altAttr = null, autocomplete = null, classString = null, inputType = null;
            base.buildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data));
            inputType   = XVar.Clone(this.pageObject.pSetEdit.getHTML5InputType((XVar)(this.field)));
            altAttr     = XVar.Clone((XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508 == true)) ? XVar.Pack(MVCFunctions.Concat(" alt=\"", this.strLabel, "\" ")) : XVar.Pack("")));
            classString = new XVar("");
            if (XVar.Pack(this.pageObject.isBootstrap()))
            {
                classString = new XVar(" class=\"form-control\"");
            }
            autocomplete = new XVar(true);
            if ((XVar)(mode == Constants.MODE_SEARCH) || (XVar)((XVar)(this.pageObject.pageType == "register") && (XVar)((XVar)(this.field == GlobalVars.cUserNameField) || (XVar)(this.field == GlobalVars.cPasswordField))))
            {
                autocomplete = new XVar(false);
            }
            MVCFunctions.Echo(MVCFunctions.Concat("<input id=\"", this.cfield, "\" ", classString, this.inputStyle, " type=\"", inputType, "\" ", (XVar.Pack(!(XVar)(autocomplete)) ? XVar.Pack("autocomplete=\"off\" ") : XVar.Pack("")), altAttr, "name=\"", this.cfield, "\" ", this.pageObject.pSetEdit.getEditParams((XVar)(this.field)), getPlaceholderAttr(), " value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(value)), "\">"));
            buildControlEnd((XVar)(validate), (XVar)(mode));
            return(null);
        }
Пример #8
0
        public virtual XVar showPageAjax()
        {
            dynamic lookupSearchControls = null, returnJSON = XVar.Array();

            lookupSearchControls = XVar.Clone(MVCFunctions.Concat(this.xt.fetch_loaded(new XVar("searchform_text")), this.xt.fetch_loaded(new XVar("searchform_search")), this.xt.fetch_loaded(new XVar("searchform_showall"))));
            this.xt.assign(new XVar("lookupSearchControls"), (XVar)(lookupSearchControls));
            addControlsJSAndCSS();
            fillSetCntrlMaps();
            returnJSON = XVar.Clone(XVar.Array());
            returnJSON.InitAndSetArrayItem(GlobalVars.pagesData, "pagesData");
            returnJSON.InitAndSetArrayItem(this.controlsHTMLMap, "controlsMap");
            returnJSON.InitAndSetArrayItem(this.viewControlsHTMLMap, "viewControlsMap");
            returnJSON.InitAndSetArrayItem(this.jsSettings, "settings");
            this.xt.assign(new XVar("header"), new XVar(false));
            this.xt.assign(new XVar("footer"), new XVar(false));
            if (XVar.Pack(isPD()))
            {
                returnJSON.InitAndSetArrayItem(MVCFunctions.Concat("<h3 data-itemtype=\"lookupheader\" data-itemid=\"lookupheader\">", getPageTitle((XVar)(this.pageType), (XVar)(MVCFunctions.GoodFieldName((XVar)(this.tName)))), "</h3>"), "headerCont");
                returnJSON.InitAndSetArrayItem(MVCFunctions.Concat(this.xt.fetch_loaded(new XVar("supertop_block")), "<div class=\"r-popup-block\">", "<div class=\"r-popup-data\">", this.xt.fetch_loaded(new XVar("above-grid_block")), this.xt.fetch_loaded(new XVar("grid_block")), "</div>", "</div>"), "html");
                returnJSON.InitAndSetArrayItem(this.xt.fetch_loaded(new XVar("below-grid_block")), "footerCont");
            }
            else
            {
                returnJSON.InitAndSetArrayItem(MVCFunctions.Concat("<h2 data-itemid=\"lookupheader\">", getPageTitle((XVar)(this.pageType), (XVar)(MVCFunctions.GoodFieldName((XVar)(this.tName)))), "</h2>"), "headerCont");
                returnJSON.InitAndSetArrayItem(this.xt.fetch_loaded(new XVar("body")), "html");
            }
            returnJSON.InitAndSetArrayItem(this.flyId, "idStartFrom");
            returnJSON.InitAndSetArrayItem(true, "success");
            returnJSON.InitAndSetArrayItem(grabAllJsFiles(), "additionalJS");
            returnJSON.InitAndSetArrayItem(grabAllCSSFiles(), "CSSFiles");
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(returnJSON)));
            return(null);
        }
Пример #9
0
        protected virtual XVar reportFirstAuthStepResult(dynamic _param_logged)
        {
            #region pass-by-value parameters
            dynamic logged = XVar.Clone(_param_logged);
            #endregion

            dynamic returnJSON = XVar.Array();
            if (XVar.Pack(this.skipSecondStep))
            {
                reportSecondAuthStepResult(new XVar(true));
                MVCFunctions.ob_flush();
                HttpContext.Current.Response.End();
                throw new RunnerInlineOutputException();
            }
            returnJSON = XVar.Clone(XVar.Array());
            returnJSON.InitAndSetArrayItem(this.message, "message");
            returnJSON.InitAndSetArrayItem((XVar)(logged) && (XVar)(this.SMSCodeSent), "success");
            returnJSON.InitAndSetArrayItem(logged, "logged");
            if (XVar.Pack(logged))
            {
                dynamic parts = XVar.Array();
                parts = XVar.Clone(getSecondStepMarkupBlocks((XVar)(this.SMSCodeSent)));
                returnJSON.InitAndSetArrayItem(parts["loginfields"], "loginfields");
                returnJSON.InitAndSetArrayItem(parts["loginbuttons"], "loginbuttons");
            }
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(returnJSON)));
            MVCFunctions.ob_flush();
            HttpContext.Current.Response.End();
            throw new RunnerInlineOutputException();
            return(null);
        }
Пример #10
0
        public override XVar processVar(dynamic _param_var_var, dynamic _param_varparams)
        {
            XVar fparams = XVar.Array();

            transformFuncParams(_param_varparams, fparams);
            MVCFunctions.Echo(processVarInternal(_param_var_var, fparams));
            return(null);
        }
Пример #11
0
        public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data)
        {
            #region pass-by-value parameters
            dynamic value                = XVar.Clone(_param_value);
            dynamic mode                 = XVar.Clone(_param_mode);
            dynamic fieldNum             = XVar.Clone(_param_fieldNum);
            dynamic validate             = XVar.Clone(_param_validate);
            dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams);
            dynamic data                 = XVar.Clone(_param_data);
            #endregion

            dynamic nHeight = null, nWidth = null;
            base.buildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data));
            nWidth  = XVar.Clone(this.pageObject.pSetEdit.getNCols((XVar)(this.field)));
            nHeight = XVar.Clone(this.pageObject.pSetEdit.getNRows((XVar)(this.field)));
            if (XVar.Pack(this.pageObject.pSetEdit.isUseRTE((XVar)(this.field))))
            {
                dynamic browser = null;
                value   = XVar.Clone(RTESafe((XVar)(value)));
                browser = new XVar("");
                if (MVCFunctions.postvalue("browser") == "ie")
                {
                    browser = new XVar("&browser=ie");
                }
                MVCFunctions.Echo(MVCFunctions.Concat("<iframe frameborder=\"0\" vspace=\"0\" hspace=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" id=\"", this.cfield, "\" ", (XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508 == true)) ? XVar.Pack(MVCFunctions.Concat("alt=\"", this.strLabel, "\" ")) : XVar.Pack("")), "name=\"", this.cfield, "\" title=\"Basic rich text editor\" style='"));
                if (XVar.Pack(!(XVar)(this.pageObject.mobileTemplateMode())))
                {
                    MVCFunctions.Echo(MVCFunctions.Concat("width: ", nWidth + 1, "px;"));
                }
                MVCFunctions.Echo(MVCFunctions.Concat("height: ", nHeight + 100, "px;'"));
                MVCFunctions.Echo(MVCFunctions.Concat(" src=\"", MVCFunctions.GetTableLink(new XVar("rte"), new XVar(""), (XVar)(MVCFunctions.Concat("ptype=", this.pageObject.pageType, "&table=", CommonFunctions.GetTableURL((XVar)(this.pageObject.tName)), "&", "id=", this.id, "&", this.iquery, browser, "&", (XVar.Pack((XVar)(mode == Constants.MODE_ADD) || (XVar)(mode == Constants.MODE_INLINE_ADD)) ? XVar.Pack("action=add") : XVar.Pack(""))))), "\">"));
                MVCFunctions.Echo("</iframe>");
            }
            else
            {
                dynamic classString = null, style = null;
                classString = new XVar("");
                style       = XVar.Clone(MVCFunctions.Concat("height: ", nHeight, "px;"));
                if (this.pageObject.getLayoutVersion() == Constants.BOOTSTRAP_LAYOUT)
                {
                    classString = new XVar(" class=\"form-control\"");
                    if ((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD))
                    {
                        style = MVCFunctions.Concat(style, "width: ", nWidth, "px;");
                    }
                }
                else
                {
                    if (XVar.Pack(!(XVar)(this.pageObject.mobileTemplateMode())))
                    {
                        style = MVCFunctions.Concat(style, "width: ", nWidth, "px;");
                    }
                }
                MVCFunctions.Echo(MVCFunctions.Concat("<textarea ", getPlaceholderAttr(), " id=\"", this.cfield, "\" ", classString, " alt=\"", this.strLabel, "\" name=\"", this.cfield, "\" style=\"", style, "\">", MVCFunctions.runner_htmlspecialchars((XVar)(value)), "</textarea>"));
            }
            buildControlEnd((XVar)(validate), (XVar)(mode));
            return(null);
        }
Пример #12
0
 public virtual XVar saveMembers(dynamic modifiedMembers)
 {
     foreach (KeyValuePair <XVar, dynamic> groups in modifiedMembers.GetEnumerator())
     {
         updateUserGroups((XVar)(groups.Key), (XVar)(groups.Value));
     }
     MVCFunctions.Echo(MVCFunctions.my_json_encode((XVar)(new XVar("success", true))));
     return(null);
 }
Пример #13
0
 public XVar detreccount()
 {
     try
     {
         dynamic dInd = null, dSTable = null, dTable = null, mKeys = null, mSTable = null, mTable = null, output = null, pageObject = null, pageType = null, respObj = null, var_params = XVar.Array();
         XTempl  xt;
         MVCFunctions.Header("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");
         mSTable = XVar.Clone(MVCFunctions.postvalue(new XVar("mSTable")));
         if (XVar.Pack(!(XVar)(CommonFunctions.checkTableName((XVar)(mSTable)))))
         {
             respObj = XVar.Clone(new XVar("success", false, "error", "Wrong master short table name"));
             MVCFunctions.Echo(MVCFunctions.my_json_encode((XVar)(respObj)));
             return(MVCFunctions.GetBuferContentAndClearBufer());
         }
         Assembly.GetExecutingAssembly().GetType(MVCFunctions.Concat("runnerDotNet.", MVCFunctions.Concat("", mSTable, ""),
                                                                     "_Variables")).InvokeMember("Apply", BindingFlags.InvokeMethod, null, null, null);
         dSTable = XVar.Clone(MVCFunctions.postvalue(new XVar("dSTable")));
         if (XVar.Pack(!(XVar)(CommonFunctions.checkTableName((XVar)(dSTable)))))
         {
             respObj = XVar.Clone(new XVar("success", false, "error", "Wrong detail short table name"));
             MVCFunctions.Echo(MVCFunctions.my_json_encode((XVar)(respObj)));
             return(MVCFunctions.GetBuferContentAndClearBufer());
         }
         Assembly.GetExecutingAssembly().GetType(MVCFunctions.Concat("runnerDotNet.", MVCFunctions.Concat("", dSTable, ""),
                                                                     "_Variables")).InvokeMember("Apply", BindingFlags.InvokeMethod, null, null, null);
         if ((XVar)(!(XVar)(CommonFunctions.isLogged())) || (XVar)(!(XVar)(CommonFunctions.CheckSecurity((XVar)(XSession.Session[MVCFunctions.Concat("_", GlobalVars.strTableName, "_OwnerID")]), new XVar("Search")))))
         {
             respObj = XVar.Clone(new XVar("success", false, "error", ""));
             MVCFunctions.Echo(MVCFunctions.my_json_encode((XVar)(respObj)));
             return(MVCFunctions.GetBuferContentAndClearBufer());
         }
         mKeys      = XVar.Clone(MVCFunctions.my_json_decode((XVar)(MVCFunctions.postvalue(new XVar("mKeys")))));
         mTable     = XVar.Clone(MVCFunctions.postvalue(new XVar("mTable")));
         dTable     = XVar.Clone(MVCFunctions.postvalue(new XVar("dTable")));
         pageType   = XVar.Clone(MVCFunctions.postvalue(new XVar("pageType")));
         xt         = XVar.UnPackXTempl(new XTempl());
         var_params = XVar.Clone(new XVar("pageType", pageType));
         var_params.InitAndSetArrayItem(xt, "xt");
         var_params.InitAndSetArrayItem(mTable, "tName");
         var_params.InitAndSetArrayItem(false, "needSearchClauseObj");
         pageObject = XVar.Clone(new RunnerPage((XVar)(var_params)));
         dInd       = new XVar(0);
         for (; dInd < MVCFunctions.count(pageObject.allDetailsTablesArr); dInd++)
         {
             if (pageObject.allDetailsTablesArr[dInd]["dDataSourceTable"] == dTable)
             {
                 break;
             }
         }
         output  = XVar.Clone(pageObject.countDetailsRecsNoSubQ((XVar)(dInd), (XVar)(mKeys)));
         respObj = XVar.Clone(new XVar("success", true, "recsCount", output));
         MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(respObj)));
         return(MVCFunctions.GetBuferContentAndClearBufer());
     }
     catch (RunnerRedirectException ex)
     { return(Redirect(ex.Message)); }
 }
Пример #14
0
        protected virtual XVar CreateCKeditor(dynamic _param_value)
        {
            #region pass-by-value parameters
            dynamic value = XVar.Clone(_param_value);
            #endregion

            MVCFunctions.Echo(MVCFunctions.Concat("<div id=\"disabledCKE_", this.cfield, "\"><textarea id=\"", this.cfield, "\" name=\"", this.cfield, "\" rows=\"8\" cols=\"60\">", MVCFunctions.runner_htmlspecialchars((XVar)(value)), "</textarea></div>"));
            return(null);
        }
Пример #15
0
        public virtual XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data)
        {
            #region pass-by-value parameters
            dynamic value                = XVar.Clone(_param_value);
            dynamic mode                 = XVar.Clone(_param_mode);
            dynamic fieldNum             = XVar.Clone(_param_fieldNum);
            dynamic validate             = XVar.Clone(_param_validate);
            dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams);
            dynamic data                 = XVar.Clone(_param_data);
            #endregion

            dynamic additionalClass = null, arrKeys = XVar.Array(), isHidden = null, j = null;
            this.searchPanelControl = XVar.Clone(isSearchPanelControl((XVar)(mode), (XVar)(additionalCtrlParams)));
            this.inputStyle         = XVar.Clone(getInputStyle((XVar)(mode)));
            if (XVar.Pack(fieldNum))
            {
                this.cfield = XVar.Clone(MVCFunctions.Concat("value", fieldNum, "_", this.goodFieldName, "_", this.id));
                this.ctype  = XVar.Clone(MVCFunctions.Concat("type", fieldNum, "_", this.goodFieldName, "_", this.id));
            }
            this.iquery = XVar.Clone(MVCFunctions.Concat("field=", MVCFunctions.RawUrlEncode((XVar)(this.field))));
            arrKeys     = XVar.Clone(this.pageObject.pSetEdit.getTableKeys());
            j           = new XVar(0);
            for (; j < MVCFunctions.count(arrKeys); j++)
            {
                this.keylink = MVCFunctions.Concat(this.keylink, "&key", j + 1, "=", MVCFunctions.RawUrlEncode((XVar)(data[arrKeys[j]])));
            }
            this.iquery     = MVCFunctions.Concat(this.iquery, this.keylink);
            isHidden        = XVar.Clone((XVar)(additionalCtrlParams.KeyExists("hidden")) && (XVar)(additionalCtrlParams["hidden"]));
            additionalClass = new XVar("");
            if (XVar.Pack(this.pageObject.isBootstrap()))
            {
                if (XVar.Pack(this.pageObject.isPD()))
                {
                    additionalClass = MVCFunctions.Concat(additionalClass, "bs-ctrlspan ");
                }
                else
                {
                    additionalClass = MVCFunctions.Concat(additionalClass, "bs-ctrlspan rnr-nowrap ");
                }
                if (this.format == Constants.EDIT_FORMAT_READONLY)
                {
                    additionalClass = MVCFunctions.Concat(additionalClass, "form-control-static ");
                }
                if ((XVar)(MVCFunctions.count(validate["basicValidate"])) && (XVar)(!XVar.Equals(XVar.Pack(MVCFunctions.array_search(new XVar("IsRequired"), (XVar)(validate["basicValidate"]))), XVar.Pack(false))))
                {
                    additionalClass = MVCFunctions.Concat(additionalClass, "bs-inlinerequired");
                }
            }
            else
            {
                additionalClass = MVCFunctions.Concat(additionalClass, "rnr-nowrap ");
            }
            MVCFunctions.Echo(MVCFunctions.Concat("<span id=\"edit", this.id, "_", this.goodFieldName, "_", fieldNum, "\" class=\"", additionalClass, "\"", (XVar.Pack(isHidden) ? XVar.Pack(" style=\"display:none\"") : XVar.Pack("")), ">"));
            return(null);
        }
Пример #16
0
 public override XVar display_loaded(dynamic filtertag = null)
 {
     if (filtertag as Object == null)
     {
         filtertag = new XVar();
     }
     Testing();
     //MVCFunctions.xt_process_template(this, str);
     MVCFunctions.Echo(MVCFunctions.RenderSectionToStringFromString(this.template, filtertag, this));
     return(null);
 }
Пример #17
0
 protected override XVar SecurityRedirect()
 {
     if (this.mode == Constants.EDIT_INLINE)
     {
         MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(new XVar("success", false, "message", "The record is not editable"))));
         MVCFunctions.ob_flush();
         HttpContext.Current.Response.End();
         throw new RunnerInlineOutputException();
     }
     Security.redirectToList((XVar)(this.tName));
     return(null);
 }
Пример #18
0
        public override XVar displayPartial(dynamic template)
        {
            StreamReader sr             = new StreamReader(HttpContext.Current.Request.PhysicalApplicationPath + "Views/" + template.ToString(), Encoding.GetEncoding((int)GlobalVars.cCodepage));
            string       templateString = sr.ReadToEnd();

            sr.Close();
            load_template(template);
            Testing();

            MVCFunctions.Echo(RunnerRazor.RenderRazorString <XTempl>(this, templateString));
            return(null);
        }
Пример #19
0
        public static XVar getJSONResult(dynamic _param_error)
        {
            #region pass-by-value parameters
            dynamic var_error = XVar.Clone(_param_error);
            #endregion

            dynamic result = XVar.Array();
            result.InitAndSetArrayItem(var_error == XVar.Pack(""), "success");
            result.InitAndSetArrayItem(var_error, "error");
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(result)));
            return(null);
        }
Пример #20
0
 public virtual XVar saveRights(dynamic modifiedRights)
 {
     foreach (KeyValuePair <XVar, dynamic> rights in modifiedRights.GetEnumerator())
     {
         foreach (KeyValuePair <XVar, dynamic> mask in modifiedRights[rights.Key].GetEnumerator())
         {
             updateTablePermissions((XVar)(mask.Key), (XVar)(rights.Key), (XVar)(mask.Value));
         }
     }
     MVCFunctions.Echo(MVCFunctions.my_json_encode((XVar)(new XVar("success", true))));
     return(null);
 }
Пример #21
0
        public virtual XVar report_error(dynamic _param_message)
        {
            #region pass-by-value parameters
            dynamic message = XVar.Clone(_param_message);
            #endregion

            MVCFunctions.Echo(message);
            MVCFunctions.ob_flush();
            HttpContext.Current.Response.End();
            throw new RunnerInlineOutputException();
            return(null);
        }
Пример #22
0
        public override XVar showPage()
        {
            dynamic contents = null, var_response = XVar.Array();

            BeforeShowList();
            var_response = XVar.Clone(XVar.Array());
            if ((XVar)(!(XVar)(isDispGrid())) && (XVar)(0 == getGridTabsCount()))
            {
                var_response.InitAndSetArrayItem(true, "noData");
                MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(var_response)));
                return(null);
            }
            prepareTemplate();
            if (XVar.Pack(isPD()))
            {
                contents = XVar.Clone(fetchForms((XVar)(new XVar(0, "grid", 1, "below-grid"))));
            }
            else
            {
                if (XVar.Pack(isBootstrap()))
                {
                    contents = XVar.Clone(MVCFunctions.Concat(this.xt.fetch_loaded(new XVar("grid_tabs")), this.xt.fetch_loaded(new XVar("message_block")), this.xt.fetch_loaded(new XVar("grid_block")), this.xt.fetch_loaded(new XVar("pagination_block"))));
                }
                else
                {
                    contents = XVar.Clone(this.xt.fetch_loaded(new XVar("body")));
                }
            }
            addControlsJSAndCSS();
            fillSetCntrlMaps();
            var_response.InitAndSetArrayItem(GlobalVars.pagesData, "pagesData");
            var_response.InitAndSetArrayItem(this.jsSettings, "settings");
            var_response.InitAndSetArrayItem(this.controlsHTMLMap, "controlsMap");
            var_response.InitAndSetArrayItem(this.viewControlsHTMLMap, "viewControlsMap");
            if ((XVar)((XVar)(this.masterPageType == Constants.PAGE_EDIT) && (XVar)(this.dashTName)) && (XVar)(this.dashElementName))
            {
                var_response.InitAndSetArrayItem(getHeaderControlsBlocks(), "headerButtonsBlock");
            }
            var_response.InitAndSetArrayItem(contents, "html");
            var_response.InitAndSetArrayItem(true, "success");
            var_response.InitAndSetArrayItem(this.id, "id");
            var_response.InitAndSetArrayItem(this.flyId, "idStartFrom");
            var_response.InitAndSetArrayItem(this.recordsDeleted, "delRecs");
            if (this.deleteMessage != "")
            {
                var_response.InitAndSetArrayItem(true, "delMess");
            }
            var_response.InitAndSetArrayItem(grabAllJsFiles(), "additionalJS");
            var_response.InitAndSetArrayItem(grabAllCSSFiles(), "additionalCSS");
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(var_response)));
            return(null);
        }
Пример #23
0
        public virtual XVar showGridOnly()
        {
            dynamic contents = null;

            prepareTemplate();
            contents = XVar.Clone(this.xt.fetch_loaded(new XVar("grid_block")));
            if (this.masterPageType != Constants.PAGE_ADD)
            {
                contents = XVar.Clone(MVCFunctions.Concat(this.xt.fetch_loaded(new XVar("grid_tabs")), this.xt.fetch_loaded(new XVar("message")), this.xt.fetch_loaded(new XVar("reorder_records")), contents));
            }
            contents = MVCFunctions.Concat(contents, this.xt.fetch_loaded(new XVar("pagination_block")));
            MVCFunctions.Echo(MVCFunctions.Concat("<div id=\"detailPreview", this.id, "\">", contents, "</div>"));
            return(null);
        }
Пример #24
0
        public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data)
        {
            #region pass-by-value parameters
            dynamic value                = XVar.Clone(_param_value);
            dynamic mode                 = XVar.Clone(_param_mode);
            dynamic fieldNum             = XVar.Clone(_param_fieldNum);
            dynamic validate             = XVar.Clone(_param_validate);
            dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams);
            dynamic data                 = XVar.Clone(_param_data);
            #endregion

            base.buildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data));
            if ((XVar)((XVar)((XVar)(mode == Constants.MODE_ADD) || (XVar)(mode == Constants.MODE_INLINE_ADD)) || (XVar)(mode == Constants.MODE_EDIT)) || (XVar)(mode == Constants.MODE_INLINE_EDIT))
            {
                dynamic var_checked = null;
                var_checked = new XVar("");
                if ((XVar)((XVar)(this.connection.dbType == Constants.nDATABASE_PostgreSQL) && (XVar)((XVar)(XVar.Equals(XVar.Pack(value), XVar.Pack("t"))) || (XVar)((XVar)(value != XVar.Pack("")) && (XVar)(value != XVar.Pack(0))))) || (XVar)((XVar)(this.connection.dbType != Constants.nDATABASE_PostgreSQL) && (XVar)((XVar)(value != XVar.Pack("")) && (XVar)(value != XVar.Pack(0)))))
                {
                    var_checked = new XVar(" checked");
                }
                if (XVar.Pack(this.pageObject.isPD()))
                {
                    MVCFunctions.Echo("<span class=\"checkbox r-checkbox-control\"><label>");
                }
                MVCFunctions.Echo(MVCFunctions.Concat("<input id=\"", this.ctype, "\" type=\"hidden\" name=\"", this.ctype, "\" value=\"checkbox\">"));
                MVCFunctions.Echo(MVCFunctions.Concat("<input id=\"", this.cfield, "\" type=\"Checkbox\" ", (XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508 == true)) ? XVar.Pack(MVCFunctions.Concat("alt=\"", this.strLabel, "\" ")) : XVar.Pack("")), "name=\"", this.cfield, "\" ", var_checked, ">"));
                if (XVar.Pack(this.pageObject.isPD()))
                {
                    MVCFunctions.Echo("</label></span>");
                }
            }
            else
            {
                dynamic optval = XVar.Array(), show = XVar.Array(), val = XVar.Array();
                MVCFunctions.Echo(MVCFunctions.Concat("<input id=\"", this.ctype, "\" type=\"hidden\" name=\"", this.ctype, "\" value=\"checkbox\">"));
                MVCFunctions.Echo(MVCFunctions.Concat("<select id=\"", this.cfield, "\" ", (XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508 == true)) ? XVar.Pack(MVCFunctions.Concat("alt=\"", this.strLabel, "\" ")) : XVar.Pack("")), "name=\"", this.cfield, "\" class=\"", (XVar.Pack(this.pageObject.isBootstrap()) ? XVar.Pack(" form-control") : XVar.Pack("")), "\">"));
                val    = XVar.Clone(new XVar("", XVar.Array(), "True", new XVar(0, "on", 1, "1"), "False", new XVar(0, "off", 1, "0")));
                optval = XVar.Clone(new XVar(0, "", 1, "on", 2, "off"));
                show   = XVar.Clone(new XVar(0, "", 1, "True", 2, "False"));
                foreach (KeyValuePair <XVar, dynamic> shownValue in show.GetEnumerator())
                {
                    dynamic sel = null;
                    sel = XVar.Clone((XVar.Pack(MVCFunctions.in_array((XVar)(value), (XVar)(val[shownValue.Value]))) ? XVar.Pack(" selected") : XVar.Pack("")));
                    MVCFunctions.Echo(MVCFunctions.Concat("<option value=\"", optval[shownValue.Key], "\"", sel, ">", shownValue.Value, "</option>"));
                }
                MVCFunctions.Echo("</select>");
            }
            buildControlEnd((XVar)(validate), (XVar)(mode));
            return(null);
        }
Пример #25
0
        public virtual XVar showPageAjax()
        {
            dynamic returnJSON = XVar.Array();

            addControlsJSAndCSS();
            fillSetCntrlMaps();
            returnJSON = XVar.Clone(XVar.Array());
            returnJSON.InitAndSetArrayItem(GlobalVars.pagesData, "pagesData");
            returnJSON.InitAndSetArrayItem(this.controlsHTMLMap, "controlsMap");
            returnJSON.InitAndSetArrayItem(this.viewControlsHTMLMap, "viewControlsMap");
            returnJSON.InitAndSetArrayItem(this.jsSettings, "settings");
            this.xt.assign(new XVar("header"), new XVar(false));
            this.xt.assign(new XVar("footer"), new XVar(false));
            if (XVar.Pack(!(XVar)(isPD())))
            {
                if (XVar.Pack(this.formBricks["header"]))
                {
                    returnJSON.InitAndSetArrayItem(fetchBlocksList((XVar)(this.formBricks["header"]), new XVar(true)), "headerCont");
                }
                returnJSON.InitAndSetArrayItem(MVCFunctions.Concat("<span class=\"rnr-dbebrick\">", getPageTitle((XVar)(this.pageType), (XVar)(MVCFunctions.GoodFieldName((XVar)(this.tName)))), "</span>", returnJSON["headerCont"]), "headerCont");
                if (XVar.Pack(this.formBricks["footer"]))
                {
                    returnJSON.InitAndSetArrayItem(fetchBlocksList((XVar)(this.formBricks["footer"]), new XVar(true)), "footerCont");
                }
                assignFormFooterAndHeaderBricks(new XVar(false));
                this.xt.prepareContainers();
                if (XVar.Pack(isBootstrap()))
                {
                    returnJSON.InitAndSetArrayItem(MVCFunctions.Concat(this.xt.fetch_loaded(new XVar("message_block")), this.xt.fetch_loaded(new XVar("reorder_records")), this.xt.fetch_loaded(new XVar("grid_block"))), "html");
                }
                else
                {
                    returnJSON.InitAndSetArrayItem(this.xt.fetch_loaded(new XVar("body")), "html");
                }
            }
            else
            {
                hideForm(new XVar("above-grid"));
                returnJSON.InitAndSetArrayItem(fetchForms((XVar)(new XVar(0, "above-grid", 1, "grid"))), "html");
                returnJSON.InitAndSetArrayItem(MVCFunctions.Concat("<span class=\"rnr-dbebrick\">", getPageTitle((XVar)(this.pageType), (XVar)(MVCFunctions.GoodFieldName((XVar)(this.tName)))), "</span>"), "headerCont");
                returnJSON.InitAndSetArrayItem(fetchForms((XVar)(new XVar(0, "below-grid"))), "footerCont");
            }
            returnJSON.InitAndSetArrayItem(this.flyId, "idStartFrom");
            returnJSON.InitAndSetArrayItem(true, "success");
            returnJSON.InitAndSetArrayItem(grabAllJsFiles(), "additionalJS");
            returnJSON.InitAndSetArrayItem(grabAllCSSFiles(), "CSSFiles");
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(returnJSON)));
            return(null);
        }
Пример #26
0
        public virtual XVar showPage()
        {
            dynamic bricksExcept = XVar.Array();

            beforeShowChart();
            if ((XVar)((XVar)(this.mode == Constants.CHART_DETAILS) || (XVar)(this.mode == Constants.CHART_DASHBOARD)) || (XVar)(this.mode == Constants.CHART_DASHDETAILS))
            {
                addControlsJSAndCSS();
                fillSetCntrlMaps();
                this.xt.assign(new XVar("header"), new XVar(false));
                this.xt.assign(new XVar("footer"), new XVar(false));
                this.body.InitAndSetArrayItem("", "begin");
                this.body.InitAndSetArrayItem("", "end");
                this.xt.assign(new XVar("body"), (XVar)(this.body));
                bricksExcept = XVar.Clone(new XVar(0, "chart", 1, "message"));
                if (XVar.Pack(displayTabsInPage()))
                {
                    bricksExcept.InitAndSetArrayItem("bsgrid_tabs", null);
                }
                this.xt.hideAllBricksExcept((XVar)(bricksExcept));
                displayAJAX((XVar)(this.templatefile), (XVar)(this.id + 1));
                MVCFunctions.ob_flush();
                HttpContext.Current.Response.End();
                throw new RunnerInlineOutputException();
            }
            if (this.mode == Constants.CHART_POPUPDETAILS)
            {
                dynamic respArr = XVar.Array();
                bricksExcept = XVar.Clone(new XVar(0, "grid", 1, "pagination"));
                this.xt.assign(new XVar("header"), new XVar(false));
                this.xt.assign(new XVar("footer"), new XVar(false));
                this.body.InitAndSetArrayItem("", "begin");
                this.body.InitAndSetArrayItem("", "end");
                this.xt.hideAllBricksExcept((XVar)(bricksExcept));
                this.xt.prepare_template((XVar)(this.templatefile));
                respArr = XVar.Clone(XVar.Array());
                respArr.InitAndSetArrayItem(true, "success");
                respArr.InitAndSetArrayItem(this.xt.fetch_loaded(new XVar("body")), "body");
                respArr.InitAndSetArrayItem(MVCFunctions.postvalue(new XVar("counter")), "counter");
                this.xt.assign(new XVar("container_master"), new XVar(false));
                MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(respArr)));
                MVCFunctions.ob_flush();
                HttpContext.Current.Response.End();
                throw new RunnerInlineOutputException();
            }
            display((XVar)(this.templatefile));
            return(null);
        }
Пример #27
0
        }         // AfterAppInit

        // onscreen events
        public XVar event_Informacion_usuario(dynamic header)
        {
            try
            {
                //Obtener Horas personales
                //dynamic personales;
                //dynamic rsp = DB.Query("EXEC getCantidadHorasPersonales '"+XSession.Session["ONI"].ToString()+"'");
                //personales = rsp.fetchAssoc();

                //Obtener Horas compesadas disponibles
                //string sqlcompesado= "SELECT dbo.EMPLEADO.saldo_compesado FROM dbo.EMPLEADO WHERE dbo.EMPLEADO.ONI='"+XSession.Session["ONI"].ToString()+"'";
                //XVar rsc = CommonFunctions.db_query(sqlcompesado, null);
                //XVar compesados = CommonFunctions.db_fetch_array(rsc);

                //dynamic compesados;
                //dynamic rsc = DB.Query("EXEC getCantidadHorasCompesadas '"+XSession.Session["ONI"].ToString()+"'");
                //compesados = rsc.fetchAssoc();


                //Obtener cantidad de permisos personales asignados
                string strSQLExists = string.Format("SELECT horas_permisos_personales from dbo.HORARIOS where id_horarios = '{0}'", XSession.Session["id_horarios"].ToString());
                XVar   rsExists     = CommonFunctions.db_query(strSQLExists, null);
                XVar   data         = CommonFunctions.db_fetch_array(rsExists);

                MVCFunctions.Echo("<div class =\"jumbotron\">");
                MVCFunctions.Echo("<div class =\"container\">");
                MVCFunctions.Echo("<h2 class =\"display-3\">Informacion de usuario</h2>");
                MVCFunctions.Echo("</br>");
                MVCFunctions.Echo("<p>ONI: " + XSession.Session["ONI"].ToString() + "</p>");
                MVCFunctions.Echo("<p>Nombre: " + XSession.Session["nombre"].ToString() + "</p>");
                MVCFunctions.Echo("<p>Cargo: " + XSession.Session["tipo_empleado"].ToString() + "</p>");
                MVCFunctions.Echo("<p>Departamento: " + XSession.Session["departamento"].ToString() + "</p>");
                MVCFunctions.Echo("<p>Horario: " + XSession.Session["horarios"].ToString() + "</p>");
                MVCFunctions.Echo("<p>Horas Personales Asignadas: " + data["horas_permisos_personales"].ToString() + "</p>");
                //MVCFunctions.Echo("<p>Horas Personales Usada: "+personales["total_horas"].ToString()+"</p>");
                //MVCFunctions.Echo("<p>Horas Compesadas Acumuladas: "+compesados["saldo_compesado"].ToString()+"</p>");
                MVCFunctions.Echo("</div>");
                MVCFunctions.Echo("</div>");
            }
            catch (Exception e)
            {
                MVCFunctions.EchoToOutput("<div class=\"alert alert-danger\" role=\"alert\"><strong>Error!</strong>Se presentado el siguiente error: " + e.Message + "</div>");
            }



            return(null);
        }
Пример #28
0
        public override XVar showPage()
        {
            dynamic var_response = XVar.Array();

            fillSetCntrlMaps();
            var_response = XVar.Clone(XVar.Array());
            var_response.InitAndSetArrayItem(GlobalVars.pagesData, "pagesData");
            var_response.InitAndSetArrayItem(this.jsSettings, "settings");
            var_response.InitAndSetArrayItem(this.controlsHTMLMap, "controlsMap");
            var_response.InitAndSetArrayItem(getMapDiv(), "html");
            var_response.InitAndSetArrayItem(true, "success");
            var_response.InitAndSetArrayItem(this.id, "id");
            var_response.InitAndSetArrayItem(grabAllJsFiles(), "additionalJS");
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(var_response)));
            return(null);
        }
Пример #29
0
        public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data)
        {
            #region pass-by-value parameters
            dynamic value                = XVar.Clone(_param_value);
            dynamic mode                 = XVar.Clone(_param_mode);
            dynamic fieldNum             = XVar.Clone(_param_fieldNum);
            dynamic validate             = XVar.Clone(_param_validate);
            dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams);
            dynamic data                 = XVar.Clone(_param_data);
            #endregion

            base.buildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data));
            MVCFunctions.Echo(MVCFunctions.Concat("<input id=\"", this.cfield, "\" type=\"Hidden\" name=\"", this.cfield, "\" value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(value)), "\">"));
            buildControlEnd((XVar)(validate), (XVar)(mode));
            return(null);
        }
Пример #30
0
        public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data)
        {
            #region pass-by-value parameters
            dynamic value                = XVar.Clone(_param_value);
            dynamic mode                 = XVar.Clone(_param_mode);
            dynamic fieldNum             = XVar.Clone(_param_fieldNum);
            dynamic validate             = XVar.Clone(_param_validate);
            dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams);
            dynamic data                 = XVar.Clone(_param_data);
            #endregion

            base.parentBuildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data));
            MVCFunctions.Echo(MVCFunctions.Concat("<input id=\"", this.cfield, "\" ", this.inputStyle, " type=\"text\" ", (XVar.Pack(mode == Constants.MODE_SEARCH) ? XVar.Pack("autocomplete=\"off\" ") : XVar.Pack("")), (XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508 == true)) ? XVar.Pack(MVCFunctions.Concat("alt=\"", this.strLabel, "\" ")) : XVar.Pack("")), "name=\"", this.cfield, "\" ", this.pageObject.pSetEdit.getEditParams((XVar)(this.field)), " value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(value)), "\">"));
            buildControlEnd((XVar)(validate), (XVar)(mode));
            return(null);
        }