示例#1
0
 /// <summary>
 /// 查询matchuser
 /// </summary>
 /// <param name="matchid"></param>
 /// <returns></returns>
 public List <tblmatchusers> GetMatchUserBymatchid(string matchid)
 {
     using (var db = new BFdbContext())
     {
         return(db.FindAll <tblmatchusers>(p => p.Match_Id == matchid && p.Status == "1").ToList());
     }
 }
示例#2
0
 /// <summary>
 /// 查询team
 /// </summary>
 /// <param name="matchid"></param>
 /// <returns></returns>
 public List <tblteams> CheckTeamsNo(string matchid, string teamno, string teamid)
 {
     using (var db = new BFdbContext())
     {
         return(db.FindAll <tblteams>(p => p.match_id == matchid && p.Teamno == teamno && p.Status == 0 && p.teamid != teamid && p.Teamno != "0").ToList());
     }
 }
示例#3
0
 /// <summary>
 /// 查询team
 /// </summary>
 /// <param name="matchid"></param>
 /// <returns></returns>
 public List <tblteams> GetTeamsBymatchid(string matchid, string linesid)
 {
     using (var db = new BFdbContext())
     {
         return(db.FindAll <tblteams>(p => p.match_id == matchid && p.Linesid == linesid && p.Status == 0).ToList());
     }
 }
示例#4
0
 public int GetLinesTeamCount(string linesid)
 {
     using (var db = new BFdbContext())
     {
         return(db.FindAll <tblteams>(p => p.Linesid == linesid && p.Status == 0).ToList().Count);
     }
 }
示例#5
0
 /// <summary>
 /// 用户登录
 /// </summary>
 /// <param name="name"></param>
 /// <param name="pwd"></param>
 /// <returns></returns>
 public sysmatchuser Login(string name, string pwd)
 {
     using (BFdbContext db = new BFdbContext())
     {
         IEnumerable <sysmatchuser> users = db.FindAll <sysmatchuser>(p => p.Account == name && p.Pwd == pwd && p.Status == 0);
         if (users.Count() < 1)
         {
             return(null);
         }
         else
         {
             sysmatchuser usr = users.First();
             return(usr);
         }
     }
 }
示例#6
0
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public sysuser Login(string name, string pwd)
        {
            using (BFdbContext db = new BFdbContext())
            {
                IEnumerable <sysuser> users = db.FindAll <sysuser>(p => p.Logincode == name && p.Password == pwd && p.Delflag == false);
                if (users.Count() < 1)
                {
                    return(null);
                }
                else
                {
                    sysuser usr = users.First();
                    usr.Lastlogindate = DateTime.Now;
                    usr.Logincount    = usr.Logincount.GetValueOrDefault(0) + 1;
                    db.Update <sysuser>(usr);

                    return(usr);
                }
            }
        }