示例#1
0
文件: Utility.cs 项目: sxf359/sxf
 public static int StrToInt(object expression, int defValue)
 {
     return(TypeParse.StrToInt(expression, defValue));
 }
示例#2
0
文件: Utility.cs 项目: sxf359/sxf
 public static float StrToFloat(string strValue, float defValue)
 {
     return(TypeParse.StrToFloat(strValue, defValue));
 }
示例#3
0
文件: Utility.cs 项目: sxf359/sxf
 public static bool StrToBool(string expression, bool defValue)
 {
     return(TypeParse.StrToBool(expression, defValue));
 }
示例#4
0
文件: Utility.cs 项目: sxf359/sxf
 /// <summary>
 /// 判断给定的字符串数组(strNumber)中的数据是不是都为数值型
 /// </summary>
 /// <param name="strNumber"></param>
 /// <returns></returns>
 public static bool IsNumericArray(string[] strNumber)
 {
     return(TypeParse.IsNumericArray(strNumber));
 }
示例#5
0
 /// <summary>
 /// 获得指定表单参数的int类型值
 /// </summary>
 /// <param name="strName">表单参数</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>表单参数的int类型值</returns>
 public static int GetFormInt(string strName, int defValue)
 {
     return(TypeParse.StrToInt(HttpContext.Current.Request.Form[strName], defValue));
 }
示例#6
0
 /// <summary>
 /// 获取下拉列表值
 /// </summary>
 /// <param name="ddlList"></param>
 /// <param name="defValue"></param>
 /// <returns></returns>
 public static byte GetSelectValue(DropDownList ddlList, byte defValue)
 {
     return((byte)TypeParse.StrToInt(GetSelectValue(ddlList), defValue));
 }