今天别人给我做个页面。。但是新手上路啊有关到数据库的都不会。。
else
{
Session["UserLogin"] = userModel;
String userid= "update TB_USER set lastLoginIP = '"+Common.HttpContextIPAddress.getIP()+"' , lastLoginDate = '"+DateTime.Now+"' where userID="+userID+"";
Maticsoft.DBUtility.DbHelperSQL.ExecuteSql(userid);
if()
{
}
this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type=\"text/javascript\">window.top.location.href='" + (string.IsNullOrEmpty(url) ? "../user/UserManager.aspx" : url) + "';</script>");他们说要验证 String userid= "update TB_USER set lastLoginIP = '"+Common.HttpContextIPAddress.getIP()+"' , lastLoginDate = '"+DateTime.Now+"' where userID="+userID+""; 是否大于0.大于0就是通过,能在数据库运行..请问在if()该怎么写哦.要有返回值
else
{
Session["UserLogin"] = userModel;
String userid= "update TB_USER set lastLoginIP = '"+Common.HttpContextIPAddress.getIP()+"' , lastLoginDate = '"+DateTime.Now+"' where userID="+userID+"";
Maticsoft.DBUtility.DbHelperSQL.ExecuteSql(userid);
if()
{
}
this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type=\"text/javascript\">window.top.location.href='" + (string.IsNullOrEmpty(url) ? "../user/UserManager.aspx" : url) + "';</script>");他们说要验证 String userid= "update TB_USER set lastLoginIP = '"+Common.HttpContextIPAddress.getIP()+"' , lastLoginDate = '"+DateTime.Now+"' where userID="+userID+""; 是否大于0.大于0就是通过,能在数据库运行..请问在if()该怎么写哦.要有返回值
变量 = Maticsoft.DBUtility.DbHelperSQL.ExecuteSql(userid);
if(变量 > 0){ }