Exemple #1
0
 /// <summary>
 /// 获得指定表单参数的decimal类型值
 /// </summary>
 /// <param name="strName">表单参数</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>表单参数的decimal类型值</returns>
 public static decimal GetFormDecimal(string strName, decimal defValue)
 {
     return Utils.StrToDecimal(HttpContext.Current.Request.Form[strName], defValue);
 }
Exemple #2
0
 /// <summary>
 /// 获得指定Url参数的decimal类型值
 /// </summary>
 /// <param name="strName">Url参数</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>Url参数的decimal类型值</returns>
 public static decimal GetQueryDecimal(string strName, decimal defValue)
 {
     return(Utils.StrToDecimal(HttpContext.Current.Request.QueryString[strName], defValue));
 }