帮我看一下吧,初学,分也不多!谢谢了!
为什么我的一个判断不起作用呢!程序直接运行第二个判断?
int Num = 1;
if (DateTime.Now.DayOfWeek.ToString() == "saturday ")
{
Response.Write( " <script> alert( '今天是星期六! ');;window.location.href= 'userJiang.aspx ' </script> ");
}
else
{
if (System.Convert.ToInt32(MySQL.ReturnVal( "select jifen from users where id= " + ReaderUser(2))) < Num)
{
Response.Write( " <script> alert( '对不起,您的所余积分已经不足兑换您投奖了. ') </script> ");
}
else
{
if (MySQL.Execute( "insert into toujiang (type,uid,num) values (0, " + this.ReaderUser(2) + ", " + this.skey.Text.Trim() + ") "))
{
MySQL.Execute( "update users set jifen=jifen- " + Num + " where id= " + ReaderUser(2));
Response.Write( " <script> alert( '您的投奖内容已经提交成功,请等待结果吧. ');window.location.href= 'userJiang.aspx ' </script> ");
}
else
Response.Write( " <script> alert( '对不起,投奖失败,请稍候再试. '); </script> ");
}
}
------解决方案--------------------Saturday 大小写