public class VCUtilities{\x05public VCUtilities()\x05{\x05}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 { r
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 02:06:03
public class VCUtilities{\x05public VCUtilities()\x05{\x05}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 { r
public class VCUtilities
{
\x05public VCUtilities()
\x05{
\x05}
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 class VCUtilities{\x05public VCUtilities()\x05{\x05}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 { r
C#,一堆类型转换,将String转换为各种类型,最后在数据库找什么,返回个flag