Beispiel #1
0
 /// <summary>
 /// 创建
 /// </summary>
 /// <param name="FileName">原始图片路径</param>
 public bool SetImage(string FileName)
 {
     srcFileName = SysConstant.GetMapPath(FileName);
     try
     {
         srcImage = Image.FromFile(srcFileName);
     }
     catch
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        /// <summary>
        /// 获得指定表单参数的值
        /// </summary>
        /// <param name="strName">表单参数</param>
        /// <param name="sqlSafeCheck">是否进行SQL安全检查</param>
        /// <returns>表单参数的值</returns>
        public static string GetFormString(string strName, bool sqlSafeCheck)
        {
            if (HttpContext.Current.Request.Form[strName] == null)
            {
                return("");
            }

            if (sqlSafeCheck && !SysConstant.IsSafeSqlString(HttpContext.Current.Request.Form[strName]))
            {
                return("unsafe string");
            }

            return(HttpContext.Current.Request.Form[strName]);
        }