示例#1
0
        public string DateTimeDateDiff(string field, ref int parIndex, AddParameHandler addParame, object[] args)
        {
            string parName = string.Format("@DateDiff{0}", parIndex);

            addParame(parName, args[1]);
            //DateDiff(2015/2/5 17:59:44,t1.AddTime,@DateDiff1)>1
            return(dBAdapter.DateDiffFormat(field, args[0].ToString(), parName));
            //return string.Format("DateDiff({0},{1},{2}){3}", args[0], field, parName, args[2]);
        }
示例#2
0
        public string DateTimeDateDiff(CRLExpression.MethodCallObj methodInfo, ref int parIndex, AddParameHandler addParame)
        {
            var    field    = methodInfo.MemberQueryName;
            var    nodeType = methodInfo.ExpressionType;
            var    args     = methodInfo.Args;
            string parName  = string.Format("@DateDiff{0}", parIndex);
            var    args1    = args[0];

            if (args1 is ExpressionValueObj)
            {
                parName = args1.ToString();
            }
            else
            {
                addParame(parName, args[1]);
            }
            parIndex += 1;
            //DateDiff(2015/2/5 17:59:44,t1.AddTime,@DateDiff1)>1
            return(dBAdapter.DateDiffFormat(field, args[0].ToString(), parName));
            //return string.Format("DateDiff({0},{1},{2}){3}", args[0], field, parName, args[2]);
        }