public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "Visible") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.style.display", CodeName));
            }
            if (string.CompareOrdinal(attributeName, "BackColor") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.style.backgroundColor", CodeName));
            }
            if (string.CompareOrdinal(attributeName, "Text") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "JsonDataBinding.GetInnerText({0})", CodeName));
            }
            if (string.CompareOrdinal(attributeName, "ForeColor") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.style.color", CodeName));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
 public string GetJavaScriptWebMethodReferenceCode(string ownerCodeName, string methodName, StringCollection code, StringCollection parameters)
 {
     if (string.CompareOrdinal(methodName, "MoveToNextPage") == 0)
     {
         return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.gotoNextPage()", CodeName));
     }
     else if (string.CompareOrdinal(methodName, "MoveToPreviousPage") == 0)
     {
         return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.gotoPrevPage()", CodeName));
     }
     else if (string.CompareOrdinal(methodName, "MoveToFirstPage") == 0)
     {
         return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.gotoFirstPage()", CodeName));
     }
     else if (string.CompareOrdinal(methodName, "MoveToLastPage") == 0)
     {
         return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.gotoLastPage()", CodeName));
     }
     else if (string.CompareOrdinal(methodName, "MoveToPage") == 0)
     {
         if (parameters == null || parameters.Count == 0)
         {
             throw new WebBuilderException("HtmlDataRepeater is Missing parameters for MoveToPage");
         }
         return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.gotoPage({1})", CodeName, parameters[0]));
     }
     else
     {
         return(WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(ownerCodeName, methodName, code, parameters));
     }
     //return null;
 }
예제 #3
0
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "FileTypes") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.FileTypes", CodeName));
            }
            if (string.CompareOrdinal(attributeName, "SelectedFilename") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.getSelectedFile()", CodeName));
            }
            if (string.CompareOrdinal(attributeName, "SelectedFilePath") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.getSelectedFileFullPath()", CodeName));
            }
            if (string.CompareOrdinal(attributeName, "SelectedFolderName") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.getSelectedFolder()", CodeName));
            }
            if (string.CompareOrdinal(attributeName, "SelectedFolderPath") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.getSelectedFolderFullPath()", CodeName));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
 public string GetJavaScriptWebMethodReferenceCode(string ownerCodeName, string methodName, StringCollection code, StringCollection parameters)
 {
     if (string.CompareOrdinal(methodName, "IsFileTypeValid") == 0)
     {
         return(string.Format(CultureInfo.InvariantCulture, "({0}.value.split('.').pop().toLowerCase()>=0)", Site.Name));
     }
     return(WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(ownerCodeName, methodName, code, parameters));
 }
예제 #5
0
 public string GetJavaScriptWebMethodReferenceCode(string ownerCodeName, string methodName, StringCollection code, StringCollection parameters)
 {
     if (string.CompareOrdinal(methodName, "getPrimaryKey") == 0)
     {
         return(string.Format(CultureInfo.InvariantCulture,
                              "{0}.jsData.getPrimaryKey()", ownerCodeName));
     }
     return(WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(ownerCodeName, methodName, code, parameters));
 }
예제 #6
0
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "Text") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.value", WebPageCompilerUtility.JsCodeRef(CodeName)));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "Started") == 0)
            {
                return("handle");
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
예제 #9
0
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "getPrimaryKey") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture,
                                     "{0}.jsData.getPrimaryKey()", CodeName));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(CodeName, attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "SelectedItem") == 0 || string.CompareOrdinal(attributeName, "selectedItem") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "JsonDataBinding.GetSelectedListText({0})", CodeName));
            }
            else if (string.CompareOrdinal(attributeName, "SelectedValue") == 0 || string.CompareOrdinal(attributeName, "selectedValue") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "JsonDataBinding.GetSelectedListValue({0})", CodeName));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal("SelectedDateTime", attributeName) == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "JsonDataBinding.GetDatetimePickerSelectedValue('{0}')", CodeName));
            }
            if (string.CompareOrdinal("IncludeTime", attributeName) == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "JsonDataBinding.IsDatetimePickerIncludeTime('{0}')", CodeName));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(RuntimeID), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
        public string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "IsFileTypeValid") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.toLowerCase().indexOf({1}.{2}.value.split('.').pop().toLowerCase()) >= 0", parameters[0], this.FormName, Site.Name));
            }
            if (string.CompareOrdinal(attributeName, "IsFileSizeValid") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.IsFileSizeValid({1})", Site.Name, parameters[0]));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
예제 #13
0
 public string GetJavaScriptWebMethodReferenceCode(string ownerCodeName, string methodName, StringCollection code, StringCollection parameters)
 {
     return(WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(ownerCodeName, methodName, code, parameters));
 }