public static string GetFomart(string key, string format, string def) { string tstr = UtilsCore.ParseString(System.Web.HttpContext.Current.Request[key]); System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(format); if (reg.IsMatch(tstr)) { return(tstr); } else { return(def); } }
public static decimal GetDecimal(string key) { return(UtilsCore.ParseDecimal(System.Web.HttpContext.Current.Request[key], decimal.Zero)); }
public static int GetInt(string key, int def) { return(UtilsCore.ParseInt(System.Web.HttpContext.Current.Request[key], def)); }
public static string GetString(string key, string def) { string ret = UtilsCore.ParseString(System.Web.HttpContext.Current.Request[key]); return((ret == string.Empty) ? def : ret); }
public static string GetSafeString(string key, int maxLength) { string back = UtilsCore.GetSafeString(GetString(key, "")); return(UtilsCore.Abbreviate(back, maxLength, "")); }
public static string GetSafeString(string key) { return(UtilsCore.GetSafeString(GetString(key, ""))); }