App_Code/Common.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Text.RegularExpressions;
/// <summary>
/// VCUtilities 的摘要说明
/// </summary>
public class Common
{
public Common()
{
}
public static bool IsNumeric(string s)
{
try { Convert.ToInt32(s); return true; }
catch { return false; }
}
public static bool IsDate(string s)
{
try { Convert.ToDateTime(s); return true; }
catch { return false; }
}
public static bool IsSingle(string s)
{
try { Convert.ToSingle(s); return true; }
catch { return false; }
}
public static bool IsValidUser(string UserID)
{
bool flag=false;
string sql = "select * from userinfosheet where code='" + UserID + "'";
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["connection"]);
SqlCommand cmd = new SqlCommand(sql, conn);
conn.Open();
int returnRow = Convert.ToInt32(cmd.ExecuteScalar());
if (returnRow > 0)
flag = true;
return flag;
}
public static bool IsID(string PostStr)
{
string RegStr = @"^[0-9]*[1-9][0-9]*$";
if (Regex.IsMatch(PostStr, RegStr))
{
return true;
}
else
{
return false;
}
}
后面还有 30 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。