protected override object EvaluateFunction(object[] args) { if (((args == null) || (args.Length < this.MinArgs)) || (args.Length > this.MaxArgs)) { return("#VALUE?"); } List <string> list = new List <string>(); foreach (object obj2 in args) { list.Add((string)obj2); } BugdetDataFunctionArgs args2 = new BugdetDataFunctionArgs(); Kingdee.BOS.Context namedSlotData = KdsCalcCacheMananger.GetNamedSlotData("Context") as Kingdee.BOS.Context; List <string> values = BugdetDataFunctionArgs.Validate(args2.ConvertToFunctionArgs(namedSlotData, list.ToArray()), namedSlotData); if (values.Count > 0) { return(string.Format("#{0}", string.Join("", values))); } KdsCalcCacheMananger.GetNamedSlotData("KDSContext"); KdsCalcCacheMananger.GetNamedSlotData("ReportProperty"); KdsCalcCacheMananger.GetNamedSlotData("KDSCalContext"); object obj3 = null; return(decimal.Parse(obj3.ToString())); }
private bool IntelligentValidate(FunctionExpression function, ExpressionVisitor expressionVisitor, ref Dictionary <FunctionExpression, object> dctFuncValue) { IList <object> funcArgs = this.GetFuncArgs(function, expressionVisitor); List <string> list2 = new List <string>(); foreach (object obj2 in funcArgs) { list2.Add((string)obj2); } BugdetDataFunctionArgs args = new BugdetDataFunctionArgs(); List <string> list3 = BugdetDataFunctionArgs.Validate(args.ConvertToFunctionArgs(this.Context, list2.ToArray()), this.Context); if (list3.Count > 0) { dctFuncValue.Add(function, string.Format("#{0}", list3[0])); return(false); } return(true); }