示例#1
0
        protected virtual string GetFormJavaScript(string CheckCode, Form form, string controlName)
        {// controlName
            StringBuilder B_JavaScript     = new StringBuilder();
            EnterRule     FunctionObject_B = (EnterRule)form.FormCheckCodeObj.GetCommand("level=field&event=before&identifier=" + controlName);

            if (FunctionObject_B != null && !FunctionObject_B.IsNull())
            {
                B_JavaScript.Append("function " + controlName.ToLower());
                FunctionObject_B.ToJavaScript(B_JavaScript);
            }

            StringBuilder A_JavaScript     = new StringBuilder();
            EnterRule     FunctionObject_A = (EnterRule)form.FormCheckCodeObj.GetCommand("level=field&event=after&identifier=" + controlName);

            if (FunctionObject_A != null && !FunctionObject_A.IsNull())
            {
                A_JavaScript.Append("function " + controlName.ToLower());
                FunctionObject_A.ToJavaScript(A_JavaScript);
            }

            EnterRule FunctionObject = (EnterRule)form.FormCheckCodeObj.GetCommand("level=field&event=click&identifier=" + controlName);

            if (FunctionObject != null && !FunctionObject.IsNull())
            {
                A_JavaScript.Append("function " + controlName.ToLower());
                FunctionObject.ToJavaScript(A_JavaScript);
            }

            return(B_JavaScript.ToString() + "  " + A_JavaScript.ToString());
        }
        public override void ToJavaScript(StringBuilder pJavaScriptBuilder)
        {
            CheckCodeBlock.ToJavaScript(pJavaScriptBuilder);

            if (CheckCodeBlocks != null)
            {
                CheckCodeBlocks.ToJavaScript(pJavaScriptBuilder);
            }
        }
示例#3
0
 public override void ToJavaScript(StringBuilder pJavaScriptBuilder)
 {
     if (this.op != null)
     {
         if (this.op == "-")
         {
             pJavaScriptBuilder.Append("-1 * ");
             Value.ToJavaScript(pJavaScriptBuilder);
         }
         else
         {
             Value.ToJavaScript(pJavaScriptBuilder);
         }
     }
     else
     {
         Value.ToJavaScript(pJavaScriptBuilder);
     }
 }