/// <summary> /// Gets the date time param. /// </summary> /// <param name="request">The request.</param> /// <param name="paramName">Name of the param.</param> /// <param name="errorReturn">The error return.</param> /// <returns>The param value.</returns> public static DateTime GetDateTimeParam(System.Web.HttpRequest request, string paramName, DateTime errorReturn) { string retStr = request.Form[paramName]; if (retStr == null) { retStr = request.QueryString[paramName]; } if (retStr == null || retStr.Trim() == string.Empty) { return(errorReturn); } try { return((DateTime)ConvertTo.FormatValue(retStr, typeof(DateTime))); } catch { return(errorReturn); } }
/// <summary> /// 读取XML参数 /// </summary> /// <param name="Name">参数名</param> /// <param name="DefaultValue">默认值</param> /// <returns></returns> public object ViewXmlSetting(String Name, object DefaultValue) { String SettingKey = EffectSettingsFormat(Settings_EffectName, Name); return(DNNGalleryProGame_Settings[SettingKey] != null?ConvertTo.FormatValue(DNNGalleryProGame_Settings[SettingKey].ToString(), DefaultValue.GetType()) : DefaultValue); }