//校验票据(数据库数据匹配) private bool ValidateTicket(string encryptToken) { bool flag = false; try { //获取数据库Token pbsEntities db = new pbsEntities(); int count = db.ticketauth.Count(m => m.token.Equals(encryptToken) && m.state == 1); if (count > 0) { flag = true; } } catch (Exception ex) { } return(flag); }