public static VarType GetXmlAttributeValue <VarType>(XmlNode XmlNode, string Name, ref bool Exist, VarType def)
        {
            VarType Ret = def;

            string ret = GetXmlAttributeValue(XmlNode, Name, ref Exist);

            if (Exist)
            {
                Ret = ConvertHelper.Convert <VarType>(ret, def);
            }

            return(Ret);
        }
        public static VarType GetXmlNodeValue <VarType>(ref XmlDocument xmlDocument, string xPath, ref bool exist, VarType def)
        {
            VarType Ret = def;

            string ret = GetXmlNodeValue(ref xmlDocument, xPath, ref exist);

            if (exist)
            {
                Ret = ConvertHelper.Convert <VarType>(ret, def);
            }

            return(Ret);
        }
 public VarType Load <VarType>(string Key, VarType def)
 {
     return(ConvertHelper.Convert <VarType>(_ViewState[Key], def));
 }
 public static VarType Load <VarType>(string Key, VarType def)
 {
     return(ConvertHelper.Convert <VarType>(Items[Key], def));
 }
        //public static HttpSessionState Session
        //{ get { return HttpContext.Current.Session; } }

        public static VarType Load <VarType>(string Key, VarType def)
        {
            return(ConvertHelper.Convert <VarType>(HttpContext.Current.Session[Key], def));
        }
 public FunctionPermissionList this[string ObjectName]
 {
     get { return(ConvertHelper.Convert <FunctionPermissionList>(this.InnerHashtable[ObjectName], null)); }
 }
 public FunctionPermission this[string FunctionName]
 {
     get { return(ConvertHelper.Convert <FunctionPermission>(this.InnerHashtable[FunctionName], null)); }
 }
Beispiel #8
0
 public static VarType Request <VarType>(string Key, VarType def)
 {
     return(ConvertHelper.Convert <VarType>(Request(Key), def));
 }
Beispiel #9
0
 public static string ReadAppSettings(string key)
 {
     return((null != ConfigurationManager.AppSettings[key]) ? ConvertHelper.Convert <string>(ConfigurationManager.AppSettings[key].ToString(), "") : "");
 }