public static object GetValue(ICodeBase codeBase, string value, e_ValueType valueType,
                                      DCBaseModel.e_ConvertType e_Convert, bool allowNull = true)
        {
            switch (valueType)
            {
            case e_ValueType.Static:
                return(DCBaseModel.GetConverted(value, e_Convert, allowNull));

            case e_ValueType.Control:
                return(DCBaseModel.GetConverted(codeBase.ControlHelper.GetValue(value), e_Convert, allowNull));

            case e_ValueType.Parameter:
                return(DCBaseModel.GetConverted(codeBase.UrlHelper.GetParameter(value), e_Convert, allowNull));

            case e_ValueType.Variable:
                return(DCBaseModel.GetConverted(codeBase.VariableHelper.GetValue(value), e_Convert, allowNull));

            case e_ValueType.SysParameter:
                switch (value)
                {
                case "GetCurrentUserID":
                    return(DCBaseModel.GetConverted(codeBase.GetCurrentUserID, e_Convert, allowNull));

                case "GetCurrentUserName":
                    return(DCBaseModel.GetConverted(codeBase.GetCurrentUserName, e_Convert, allowNull));

                case "GetThreadID":
                    return(DCBaseModel.GetConverted(codeBase.GetThreadID, e_Convert, allowNull));

                case "GetThreadUserID":
                    return(DCBaseModel.GetConverted(codeBase.GetThreadUserID, e_Convert, allowNull));
                }
                break;
            }
            return(null);
        }
Beispiel #2
0
 public identify(e_ValueType valueType)
 {
     type   = valueType;
     ID     = Guid.NewGuid().ToString();
     _index = -1;
 }
Beispiel #3
0
 public identify(e_ValueType valueType)
 {
     type = valueType;
     ID = Guid.NewGuid().ToString();
     _index = -1;
 }