DateTime t1 = DateTime.Parse(TextBox1.Text.Trim().ToString());
DateTime t2 = DateTime.Parse(TextBox2.Text.Trim().ToString());
TimeSpan ts1 = new TimeSpan(t1.Ticks);
TimeSpan ts2 = new TimeSpan(t2.Ticks);
TimeSpan ts = ts2.Subtract(ts1).Duration();
lblMsg.Text = ts.Days.ToString() + "天" + ts.Hours.ToString() + "小时" + ts.Minutes.ToString() + "分钟" + ts.Seconds.ToString() + "秒";
if (int.Parse(ts.Days.ToString()) <= 0 && int.Parse(ts.Hours.ToString()) < 2) //2小时内有效
{
result.returnValue = -1;
result.message = "您已订购该业务,正在等待确定,如未收到确认短信请2小时后再试";
return result;
}