/// <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()); } }
/// <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()); } }
/// <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()); } }
public int GetLinesTeamCount(string linesid) { using (var db = new BFdbContext()) { return(db.FindAll <tblteams>(p => p.Linesid == linesid && p.Status == 0).ToList().Count); } }
/// <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); } } }
/// <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); } } }