コード例 #1
0
        public static string GetScript()
        {
            var resource = JavaScriptHelper.GetEmbeddedScript("MixERP.Net.WebControls.ScrudFactory.ScrudItemSelector.js");
            var script   = new StringBuilder();

            script.Append(resource);
            return(script.ToString());
        }
コード例 #2
0
        public static string GetScript(string keyColumn, string customFormUrl)
        {
            var resource = JavaScriptHelper.GetEmbeddedScript("MixERP.Net.WebControls.ScrudFactory.Scrud.js");
            var script   = new StringBuilder();

            script.Append(CreateVariable("localizedAreYouSure", ScrudResource.AreYouSure));
            script.Append(CreateVariable("localizedNothingSelected", ScrudResource.NothingSelected));
            script.Append(CreateVariable("reportTemplatePath", PageUtility.ResolveUrl(ConfigurationHelper.GetScrudParameter("TemplatePath"))));
            script.Append(CreateVariable("reportHeaderPath", PageUtility.ResolveUrl(ConfigurationHelper.GetScrudParameter("HeaderPath"))));
            script.Append(CreateVariable("containerMargin", ConfigurationHelper.GetScrudParameter("GridContainerMargin")));
            script.Append(CreateVariable("date", DateTime.Now.ToString(CultureInfo.InvariantCulture)));
            script.Append(CreateVariable("keyColumn", keyColumn));
            script.Append(CreateVariable("customFormUrl", customFormUrl));

            script.Append(resource);
            return(script.ToString());
        }
コード例 #3
0
        public static string GetScript(string keyColumn, string customFormUrl, string formGridViewId, string gridPanelId, string userIdHiddenId, string officeCodeHiddenId, string titleLabelId, string formPanelId, string cancelButtonId)
        {
            var resource = JavaScriptHelper.GetEmbeddedScript("MixERP.Net.WebControls.ScrudFactory.Scrud.js", Assembly.GetExecutingAssembly());
            var script   = new StringBuilder();

            script.Append(CreateVariable("formGridViewId", formGridViewId));
            script.Append(CreateVariable("gridPanelId", gridPanelId));
            script.Append(CreateVariable("userIdHiddenId", userIdHiddenId));
            script.Append(CreateVariable("officeCodeHiddenId", officeCodeHiddenId));
            script.Append(CreateVariable("titleLabelId", titleLabelId));
            script.Append(CreateVariable("formPanelId", formPanelId));
            script.Append(CreateVariable("cancelButtonId ", cancelButtonId));

            script.Append(CreateVariable("scrudAreYouSureLocalized", Titles.AreYouSure));
            script.Append(CreateVariable("scrudNothingSelectedLocalized", Titles.NothingSelected));
            script.Append(CreateVariable("reportTemplatePath", PageUtility.ResolveUrl(ConfigurationHelper.GetScrudParameter("TemplatePath"))));
            script.Append(CreateVariable("reportHeaderPath", PageUtility.ResolveUrl(ConfigurationHelper.GetScrudParameter("HeaderPath"))));
            script.Append(CreateVariable("date", DateTime.Now.ToString(CultureInfo.InvariantCulture)));
            script.Append(CreateVariable("keyColumn", keyColumn));
            script.Append(CreateVariable("customFormUrl", customFormUrl));

            script.Append(resource);
            return(script.ToString());
        }