コード例 #1
0
ファイル: TeamBll.cs プロジェクト: zyzhouone/Match
 /// <summary>
 /// zzy
 /// </summary>
 /// <param name="batchno"></param>
 /// <returns></returns>
 public string TeamsComBineUndo(string batchno)
 {
     using (var db = new BFdbContext())
     {
         BFParameters bf = new BFParameters();
         bf.Add("@in_batchno", batchno);
         bf.Add("@msg", null, DbType.String, ParameterDirection.Output);
         db.MysqlExecuteProcedure("sp_teamcombine_undo", bf);
         return(bf.GetOutParameter("@msg").ToString());
     }
 }
コード例 #2
0
ファイル: TeamBll.cs プロジェクト: zyzhouone/Match
 public string BuildSerial(string matchid)
 {
     using (var db = new BFdbContext())
     {
         BFParameters bf = new BFParameters();
         bf.Add("@i_matchid", matchid);
         bf.Add("@msg", null, DbType.String, ParameterDirection.Output);
         db.MysqlExecuteProcedure("sp_buildserial", bf);
         return(bf.GetOutParameter("@msg").ToString());
     }
 }
コード例 #3
0
ファイル: TeamBll.cs プロジェクト: zyzhouone/Match
 /// <summary>
 /// 队伍组合
 /// zzy 2018-12-19
 /// </summary>
 /// <param name="teamids"></param>
 /// <param name="optLines"></param>
 /// <param name="optLine"></param>
 /// <returns></returns>
 public string TeamsConBine(string teamids, string optLines, string optLine)
 {
     using (var db = new BFdbContext())
     {
         BFParameters bf = new BFParameters();
         bf.Add("@from_teamids", teamids);
         bf.Add("@to_team_id", "");
         bf.Add("@to_linesid", optLines);
         bf.Add("@to_lineid", optLine);
         bf.Add("@msg", null, DbType.String, ParameterDirection.Output);
         db.MysqlExecuteProcedure("sp_teamcombine", bf);
         return(bf.GetOutParameter("@msg").ToString());
     }
 }
コード例 #4
0
ファイル: MembershipBll.cs プロジェクト: zyzhouone/www
        public string CheckPay(string oid, int paycnt, string matchid)
        {
            using (var db = new BFdbContext())
            {
                BFParameters bf = new BFParameters();
                bf.Add("@orderid", oid);
                bf.Add("@tcnt", paycnt, DbType.Int32);
                bf.Add("@matchid", matchid);
                bf.Add("@msg", null, DbType.String, ParameterDirection.Output);
                db.MysqlExecuteProcedure("sp_paycheck", bf);

                return(bf.GetOutParameter("@msg").ToString());
            }
        }
コード例 #5
0
ファイル: TeamBll.cs プロジェクト: zyzhouone/Match
        /// <summary>
        /// zzy 2018-12-30
        /// 替换队员
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="mid"></param>
        /// <returns></returns>
        public string Replayer(string mobile, string mid)
        {
            using (var db = new BFdbContext())
            {
                BFParameters bf = new BFParameters();
                bf.Add("@new_mobile", mobile);
                bf.Add("@org_matchuserid", mid);
                bf.Add("@msg", null, DbType.String, ParameterDirection.Output);
                db.MysqlExecuteProcedure("sp_teamcombine_setplayer", bf);
                return(bf.GetOutParameter("@msg").ToString());

                //var usr = db.tblusers.FirstOrDefault(p => p.Mobile == mobile && p.Status == 0);
                ////if (usr == null || usr.Isupt == "0")
                ////    return -4;

                //var musr = db.tblmatchusers.FirstOrDefault(p => p.Matchuserid == mid);
                //if (musr == null || (musr.Status != "1" && musr.Status != "8"))
                //    return -3;

                ////if (db.tblmatchusers.Any(p => p.Match_Id == musr.Match_Id && p.use == usr.userid && p.Status == "1"))
                ////    return -1;

                //tblmatchusers tm = new tblmatchusers();
                //tm.birthday = usr.birthday;
                //tm.Cardno = usr.cardno;
                //tm.Cardtype = usr.cardtype;
                //tm.Createtime = DateTime.Now;
                //tm.Leader = 0;
                //tm.Match_Id = musr.Match_Id;
                //tm.Matchuserid = Guid.NewGuid().ToString();
                //tm.Mobile = usr.Mobile;
                //tm.Nickname = usr.Name;
                //tm.Pay = 0;
                //tm.Sexy = int.Parse(usr.sexy);
                //tm.Status = "1";
                //tm.Teamid = musr.Teamid;
                //tm.Teamname = musr.Teamname;
                //tm.Userid = usr.userid;
                //SetYearOld(tm);

                //if (tm.Age < 16 || tm.Age > 60)
                //    return -9;

                //db.TInsert<tblmatchusers>(tm);
                //db.TDelete<tblmatchusers>(musr);

                //tblreplace tbl = new tblreplace();
                //tbl.Createtime = DateTime.Now;
                //tbl.D_Age = musr.Age;
                //tbl.D_Birthday = musr.birthday;
                //tbl.D_Cardno = musr.Cardno;
                //tbl.D_Cardtype = musr.Cardtype;
                //tbl.D_Flag = "1";
                //tbl.D_Agreetime = DateTime.Now;
                //tbl.D_Matchuserid = musr.Matchuserid;
                //tbl.D_Mobile = musr.Mobile;
                //tbl.D_Nickname = musr.Nickname;
                //tbl.D_Sexy = musr.Sexy;
                //tbl.D_Userid = musr.Userid;
                //tbl.Id = Guid.NewGuid().ToString();
                //tbl.Match_Id = musr.Match_Id;
                //tbl.S_Flag = "1";
                //tbl.S_Userid = usr.userid;
                //tbl.S_Matchuserid = tm.Matchuserid;
                //tbl.S_Agreetime = DateTime.Now;
                //tbl.Teamid = musr.Teamid;

                //db.TInsert<tblreplace>(tbl);

                //return db.SaveChanges();
            }
        }