Exemple #1
0
        public ActionResult Step4(string tid)
        {
            ViewBag.tid = tid;
            TeamRegBll bll = new TeamRegBll();

            return(View(bll.GetLineById(int.Parse(tid))));
        }
Exemple #2
0
        public ActionResult Step4(string tid, string tp)
        {
            if (UserInfo == null)
            {
                return(RedirectToAction("login", "member"));
            }

            ViewBag.tp = tp;
            TeamRegBll bll = new TeamRegBll();

            ViewBag.tid = tid;
            var mbll = new MembershipBll();
            var usr  = mbll.GetUserByTeamId(tid);
            //var usr = bll.GetMatchuserById(tid, UserInfo.userid);

            var line = bll.GetLineById(tid);

            if (line == null)
            {
                return(RedirectToAction("Step3", new { tid = tid }));
            }

            ViewBag.cnt  = line.Playercount.Value - 1;
            ViewBag.lsts = line.Status;

            if (line.Matchid == "6a61b95b-2d5d-4373-abaf-bf4e4c438800")
            {
                ViewBag.lname = line.Lineno;
            }
            else
            {
                if (string.IsNullOrEmpty(line.Lineno))
                {
                    ViewBag.lname = line.Linename;
                }
                else
                {
                    ViewBag.lname = line.Lineno + "-" + line.Linename;
                }
            }

            var mt = bll.GetMatchByTeamid(tid);

            if (mt != null)
            {
                ViewBag.tp = ((mt.Status == "1" || mt.Status == "2" || mt.Status == "3") && mt.Paystatus == 6 && mt.chglines == "1") ? "1" : "";

                ViewBag.matchstatus = mt.Status;
                ViewBag.matchname   = mt.Match_name;
                ViewBag.tname       = mt.Teamname;
                ViewBag.leader      = (mt.userid == UserInfo.userid ? "1" : "0");
                ViewBag.date2       = mt.Date2.Value.ToString("yyyy年MM月dd日");
                if (mt.Paystatus == 1 || mt.Paystatus == 0)
                {
                    return(RedirectToAction("Step5", new { tid = tid }));
                }
            }

            return(View(usr));
        }
Exemple #3
0
        public JsonResult CheckTname(string matchid, string tname)
        {
            //检查敏感词
            WebClient MyWebClient = new WebClient();
            string    strUrl      = string.Format(ConfigurationManager.AppSettings.Get("api_url") + "/signUp/checkName?teamname={0}", tname);

            MyWebClient.Credentials = CredentialCache.DefaultCredentials;
            byte[] pageData = MyWebClient.DownloadData(strUrl);

            String      strJson = Encoding.UTF8.GetString(pageData) ?? "";
            ResultModel rb      = JsonConvert.DeserializeObject <ResultModel>(strJson);

            if (rb.code == 0)
            {
                TeamRegBll bll = new TeamRegBll();
                bool       res = bll.CheckTname(matchid, tname);

                if (res)
                {
                    return(RepReurnError("已经存在相同的队伍名称"));
                }
                else
                {
                    return(RepReurnOK());
                }
            }
            else
            {
                return(RepReurnError(rb.msg));
            }
        }
Exemple #4
0
        public ActionResult Protocol(string matchid)
        {
            if (UserInfo == null)
            {
                return(RedirectToAction("login", "member"));
            }

            TeamRegBll bll = new TeamRegBll();
            var        tm  = bll.GetTeamByum(UserInfo.userid, matchid);

            if (tm != null)
            {
                //已经注册过队伍,则跳转到对应步骤
                if (string.IsNullOrEmpty(tm.Lineid))
                {
                    return(RedirectToAction("Step3", new { tid = tm.Teamid }));
                }
                else
                {
                    return(RedirectToAction("Step4", new { tid = tm.Teamid }));
                }
            }

            var mt = bll.GetMatchById(matchid);

            if (mt != null)
            {
                ViewBag.matchname = mt.Match_name;
                ViewBag.notice    = mt.Notice;
            }

            ViewBag.tid = matchid;
            return(View());
        }
Exemple #5
0
        public ActionResult Step3(string tid)
        {
            ViewBag.tid = tid;
            TeamRegBll bll = new TeamRegBll();

            return(View(bll.GetLines()));
        }
Exemple #6
0
        public JsonResult getlines(string lid, string tp)
        {
            TeamRegBll bll = new TeamRegBll();
            var        res = bll.getLines(lid);

            return(RepReurnOK(res));
        }
Exemple #7
0
        public ActionResult matchcert_ht(string userid, string matchid)
        {
            TeamRegBll            bll = new TeamRegBll();
            List <tblmatchentity> ent = bll.GetMatchUsersByUidMid(userid, matchid);

            if (ent == null)
            {
                ent = new List <tblmatchentity>();
            }
            return(View(ent));
        }
Exemple #8
0
        public JsonResult ckcoupon(string couponno, string company)
        {
            if (UserInfo == null)
            {
                return(RepReurnError("请登录"));
            }

            Fmodel     fm  = new Fmodel();
            TeamRegBll bll = new TeamRegBll();
            int        res = bll.ckcoupon(couponno, UserInfo.userid, company, ref fm);

            if (res >= 0)
            {
                return(RepReurnOK(fm));
            }
            else if (res == -2)
            {
                return(RepReurnError("邀请码不正确或者已经被使用"));
            }
            else if (res == -3)
            {
                return(RepReurnError("你不是队长,不能操作"));
            }
            else if (res == -908)
            {
                return(RepReurnError("公司名称不正确"));
            }
            else if (res == -909)
            {
                fm.tag = "909";
                //  return RepReurnError("路线人数要求不同,不能使用F码");
                return(RepReurnOK(fm));
            }
            else if (res == -910)
            {
                return(RepReurnError("邀请码目前还不能使用,请到日期使用"));
            }
            else if (res == -911)
            {
                return(RepReurnError("你已经正式报名成功,不能使用支付邀请码"));
            }
            else if (res == -912)
            {
                return(RepReurnError("你已建队伍路线和邀请邀请路线冲突,请先[我的信息]里取消队伍,再使用邀请码"));
            }
            else if (res == -913)
            {
                return(RepReurnError("邀请码已经被使用"));
            }
            else
            {
                return(RepReurnError("操作中出现错误"));
            }
        }
Exemple #9
0
        public ActionResult matchdetail(string userid, string matchid)
        {
            TeamRegBll            bll = new TeamRegBll();
            List <tblmatchentity> lst = bll.GetMatchUsersByUidMid(userid, matchid);

            if (lst == null)
            {
                lst = new List <tblmatchentity>();
            }

            return(View(lst));
        }
Exemple #10
0
        /// <summary>
        /// 获取验证码
        /// </summary>
        /// <param name="mobile"></param>
        /// <returns></returns>
        public JsonResult GetSMS(string mobile)
        {
            TeamRegBll bll = new TeamRegBll();
            int        res = bll.Step1(mobile);

            if (res == 1)
            {
                return(RepReurnOK());
            }
            else
            {
                return(RepReurnError("获取验证码时出现错误"));
            }
        }
Exemple #11
0
        public JsonResult delplayer(string uid)
        {
            TeamRegBll bll = new TeamRegBll();
            int        res = bll.DelMatchuser(uid);

            if (res <= 0)
            {
                return(RepReurnError("删除中出现错误"));
            }
            else
            {
                return(RepReurnOK());
            }
        }
Exemple #12
0
        public JsonResult CheckTname(string matchid, string tname)
        {
            TeamRegBll bll = new TeamRegBll();
            bool       res = bll.CheckTname(matchid, tname);

            if (res)
            {
                return(RepReurnError("已经存在相同的队伍名称"));
            }
            else
            {
                return(RepReurnOK());
            }
        }
Exemple #13
0
        public JsonResult inputmb(List <tblmatchusers> mus, string tid)
        {
            TeamRegBll bll = new TeamRegBll();
            int        res = bll.InputMb(mus, int.Parse(tid));

            if (res < 0)
            {
                return(RepReurnError("操作中出现错误"));
            }
            else
            {
                return(RepReurnOK());
            }
        }
Exemple #14
0
        public JsonResult SelLine(string tid, string lid)
        {
            TeamRegBll bll = new TeamRegBll();
            int        res = bll.SelectLine(tid, lid);

            if (res < 0)
            {
                return(RepReurnError("操作中出现错误"));
            }
            else
            {
                return(RepReurnOK());
            }
        }
Exemple #15
0
        public JsonResult RegTname(string id, string tid, string tname, string tcom, string pwd)
        {
            string md5Pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(pwd, "MD5");

            TeamRegBll bll = new TeamRegBll();
            int        res = bll.RegTname(id, tid, tname, tcom, md5Pwd);

            if (res == -1)
            {
                return(RepReurnError("已经存在相同的队伍名称"));
            }
            else
            {
                return(RepReurn(0, res.ToString(), null));
            }
        }
Exemple #16
0
        public JsonResult couponok(string tmname, string couponno, string company)
        {
            if (UserInfo == null)
            {
                return(RepReurnError("请登录"));
            }

            TeamRegBll bll = new TeamRegBll();
            string     res = bll.checkcoupon(couponno, UserInfo.userid, company, tmname);

            if (res == "-2")
            {
                return(RepReurnError("邀请码不正确或者已经被使用"));
            }
            else if (res == "-3")
            {
                return(RepReurnError("你的信息还没有完善,请先更新个人信息再后续操作"));
            }
            else if (res == "-908")
            {
                return(RepReurnError("公司名称不正确"));
            }
            else if (res == "-910")
            {
                return(RepReurnError("邀请码目前还不能使用,请到日期使用"));
            }
            else if (res == "-911")
            {
                return(RepReurnError("已经存在相同的队伍名称"));
            }
            else if (res == "-912")
            {
                return(RepReurnError("你已经正式报名成功,不能使用支付邀请码"));
            }
            else if (res == "-913")
            {
                return(RepReurnError("你已建队伍路线和邀请邀请路线冲突,请先[我的信息]里取消队伍,再使用邀请码"));
            }
            else if (res == "-914")
            {
                return(RepReurnError("邀请码已经被使用"));
            }
            else
            {
                return(RepReurn(0, res, null));
            }
        }
Exemple #17
0
        /// <summary>
        /// zzy 2019-01-22
        /// 抢购订单
        /// </summary>
        /// <param name="tid"></param>
        /// <returns></returns>
        public JsonResult CreatePrepay(string tid, string vCode)
        {
            TeamRegBll bll  = new TeamRegBll();
            var        team = bll.GetTeamById(tid);

            WebClient MyWebClient = new WebClient();
            string    strUrl      = string.Format(ConfigurationManager.AppSettings.Get("api_url") + "/order/createPrepay?sessionKey={0}&userId={1}&teamId={2}&matchId={3}&vcode={4}&linesId={5}&payType={6}", team.Userid, team.Userid, team.teamid, team.match_id, vCode, team.Linesid, "ALIWEB");

            MyWebClient.Credentials = CredentialCache.DefaultCredentials;
            byte[] pageData = MyWebClient.DownloadData(strUrl);


            String        strJson = Encoding.UTF8.GetString(pageData) ?? "";
            ResponseModel rb      = JsonConvert.DeserializeObject <ResponseModel>(strJson);

            return(Json(rb, JsonRequestBehavior.AllowGet));
        }
Exemple #18
0
        public JsonResult QueryPrepay(string tid, string orderNo)
        {
            TeamRegBll bll  = new TeamRegBll();
            var        team = bll.GetTeamById(tid);

            WebClient MyWebClient = new WebClient();
            //查询是否可以支付
            // string strUrl = string.Format(ConfigurationManager.AppSettings.Get("api_url") + "/order/queryPrepay?sessionKey={0}&orderNo={1}", team.Userid, orderNo);
            string strUrl = string.Format(ConfigurationManager.AppSettings.Get("api_url") + "/order/queryPrepay?sessionKey={0}&orderNo={1}", team.Userid, orderNo);

            MyWebClient.Credentials = CredentialCache.DefaultCredentials;
            byte[]        pageData = MyWebClient.DownloadData(strUrl);
            String        strJson  = Encoding.UTF8.GetString(pageData) ?? "";
            ResponseModel rb       = JsonConvert.DeserializeObject <ResponseModel>(strJson);

            return(Json(rb, JsonRequestBehavior.AllowGet));
        }
Exemple #19
0
        public ActionResult matchcert(string userid, string matchid)
        {
            if (matchid == "91083e8d-2b3a-428e-97c9-50ca9ba4fb35")
            {
                return(RedirectToAction("matchcert_ht", new { userid = userid, matchid = matchid }));
            }

            TeamRegBll     bll = new TeamRegBll();
            tblmatchentity ent = bll.GetMatchUserByUidMid(userid, matchid);

            if (ent == null)
            {
                ent      = new tblmatchentity();
                ent.Mono = "NONE";
            }
            return(View(ent));
        }
Exemple #20
0
        public JsonResult editplayer(tblmatchusers tm)
        {
            TeamRegBll bll = new TeamRegBll();
            int        res = bll.UpdatelMatchuser(tm);

            if (res > 0)
            {
                return(RepReurnOK());
            }
            else if (res == -2)
            {
                return(RepReurnError("这个身份证号已经被注册"));
            }
            else
            {
                return(RepReurnError("编辑中出现错误"));
            }
        }
Exemple #21
0
        public JsonResult CheckSMS(string mobile, string vercode)
        {
            TeamRegBll bll = new TeamRegBll();

            int res = bll.CheckSms(mobile, vercode, "6a61b95b-2d5d-4373-abaf-bf4e4c438900");

            if (res > 0)
            {
                return(RepReurn(0, res.ToString(), null));
            }
            else if (res == -2)
            {
                return(RepReurnError("抱歉,这个号码已经被注册过"));
            }
            else
            {
                return(RepReurnError("输入的验证码错误"));
            }
        }
Exemple #22
0
        public JsonResult CheckSMS(string mobile, string vercode, string matchid)
        {
            TeamRegBll bll = new TeamRegBll();

            string res = bll.CheckSms(mobile, vercode, matchid);

            if (res == "-1")
            {
                return(RepReurnError("输入的验证码错误"));
            }
            else if (res == "-2")
            {
                return(RepReurnError("抱歉,这个号码已经被注册过"));
            }
            else
            {
                return(RepReurn(0, res, null));
            }
        }
Exemple #23
0
        public JsonResult addextra(tblmatchextra extra)
        {
            TeamRegBll bll = new TeamRegBll();

            int res = bll.AddExtra(extra.extype, extra.teamid, extra.info1, extra.info2, extra.info3, extra.cardtype, extra.sexy, extra.birthday);

            if (res > 0)
            {
                return(RepReurnOK());
            }
            else if (res == -80)
            {
                return(RepReurnError("宝宝年龄需要在6-13周岁之间"));
            }
            else
            {
                return(RepReurnError("操作中出现错误"));
            }
        }
Exemple #24
0
        public ActionResult Step3(string tid, string tp)
        {
            ViewBag.tid = tid;
            TeamRegBll bll = new TeamRegBll();
            var        mt  = bll.GetMatchByTeamid(tid);

            if (mt != null)
            {
                ViewBag.matchname = mt.Match_name;
                ViewBag.tname     = mt.Teamname;

                if (mt.Status != "1" && string.IsNullOrEmpty(tp))
                {
                    return(RedirectToAction("bulletin", "dx"));
                }
            }

            ViewBag.tp = tp;
            return(View(bll.GetLines(tid)));
        }
Exemple #25
0
        public JsonResult addplayer(string tid, string m)
        {
            TeamRegBll bll = new TeamRegBll();
            int        res = bll.AddMatchuser(tid, m);

            if (res == -3)
            {
                return(RepReurnError("不能邀请自己"));
            }
            else if (res == -2)
            {
                return(RepReurnError("已经被邀请"));
            }
            else if (res == -1)
            {
                return(RepReurnError(" 邀请的队员没有注册"));
            }
            else
            {
                return(RepReurnOK());
            }
        }
Exemple #26
0
        public JsonResult checkpay(string tid)
        {
            MembershipBll bll   = new MembershipBll();
            var           order = bll.GetOrderByTeamId(tid);

            if (order.Status == 2)
            {
                return(RepReurnError("已经支付成功"));
            }

            var line = bll.GetLineById(tid);
            var tm   = new TeamRegBll().GetTeamById(tid);

            if (tm.Teamtype == 1)
            {
                return(RepReurnOK());
            }

            if (line.Linesid == "207bfe24-bef3-4e1d-95dc-22228e0e04e8")
            {
                return(RepReurnError("抱歉!您所选择的线路类型已经支付结束"));
            }
            else if (line.Linesid == "119eeb28-935e-479c-b157-1dd17e6427f6" || line.Linesid == "7e34f192-f909-4f2d-9f37-99a9ad7df092" || line.Linesid == "f0efcd04-10d0-4a96-91ea-1f2e7e374250")
            {
                return(RepReurnError("抱歉!您所选择的线路类型目前还没有开始支付"));
            }

            string msg = bll.CheckPay(order.Id, line.Paycount.Value, order.Match_Id);

            if (!string.IsNullOrEmpty(msg))
            {
                return(RepReurnError(msg));
            }
            else
            {
                return(RepReurnOK());
            }
        }
Exemple #27
0
        /// <summary>
        /// zzy 2019-01-22
        /// 检查是否预约
        /// </summary>
        /// <param name="tid"></param>
        /// <returns></returns>
        public JsonResult CheckReserve(string tid)
        {
            TeamRegBll bll  = new TeamRegBll();
            var        team = bll.GetTeamById(tid);

            WebClient MyWebClient = new WebClient();
            string    strUrl      = string.Format(ConfigurationManager.AppSettings.Get("api_url") + "/order/checkReserve?teamId={0}&userId={1}&matchId={2}", team.teamid, team.Userid, team.match_id);

            MyWebClient.Credentials = CredentialCache.DefaultCredentials;
            byte[] pageData = MyWebClient.DownloadData(strUrl);


            String        strJson = Encoding.UTF8.GetString(pageData) ?? "";
            ResponseModel rb      = JsonConvert.DeserializeObject <ResponseModel>(strJson);

            if (rb.status != 1)
            {
                //没预约的先预约
                var line = bll.GetLineById(tid);
                strUrl = string.Format(ConfigurationManager.AppSettings.Get("api_url") + "/signUp/addReserve?teamid={0}&userid={1}&matchid={2}&lineName={3}&price={4}&deviceType={5}", team.teamid, team.Userid, team.match_id, line.Linename, line.Price, "0");

                pageData = MyWebClient.DownloadData(strUrl);


                strJson = Encoding.UTF8.GetString(pageData) ?? "";
                rb      = JsonConvert.DeserializeObject <ResponseModel>(strJson);
            }
            //获取验证码
            strUrl = string.Format(ConfigurationManager.AppSettings.Get("api_url") + "/order/getVCode?sessionKey={0}", team.Userid);

            pageData = MyWebClient.DownloadData(strUrl);


            strJson = Encoding.UTF8.GetString(pageData) ?? "";
            rb      = JsonConvert.DeserializeObject <ResponseModel>(strJson);

            return(Json(rb, JsonRequestBehavior.AllowGet));
        }
Exemple #28
0
        public ActionResult RegTname(string id, string tid, string tname, string tcom, string pwd)
        {
            string     md5Pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(pwd, "MD5");
            string     teamid = "";
            TeamRegBll bll    = new TeamRegBll();
            string     res    = bll.RegTname(id, tid, tname, tcom, md5Pwd, ref teamid);

            if (res == "-3")
            {
                return(RedirectToAction("Step3", new { tid = teamid }));
            }
            else if (res == "-2")
            {
                return(RepReurnError("你的基本信息还不完整,请先完善你的信息"));
            }
            else if (res == "-1")
            {
                return(RepReurnError("已经存在相同的队伍名称"));
            }
            else
            {
                return(RepReurn(0, res, null));
            }
        }
Exemple #29
0
        public ActionResult Step5(string tid)
        {
            if (UserInfo == null)
            {
                return(RedirectToAction("login", "member"));
            }

            ViewBag.quarty = -1;
            ViewBag.recnt  = 0;
            ViewBag.teamid = tid;

            TeamRegBll bll = new TeamRegBll();
            var        ms  = bll.GetMatchUsersByTeamid(tid);

            if (ms != null && ms.Count > 0)
            {
                ViewBag.match    = ms[0].Match_name;
                ViewBag.rq       = ms[0].Date3.Value.ToString("yyyy-MM-dd HH:mm");
                ViewBag.rq4      = ms[0].Date4.Value.ToString("yyyy-MM-dd HH:mm");
                ViewBag.lname    = ms[0].linename;
                ViewBag.dw       = ms[0].Teamname;
                ViewBag.tstatus  = ms[0].Teamstatus.Value.ToString();
                ViewBag.begin    = (DateTime.Now - ms[0].Date3.Value).TotalSeconds >= 0 ? "1" : "2";
                ViewBag.teamtype = ms[0].teamtype.ToString();

                if (ms[0].Match_Id == "6a61b95b-2d5d-4373-abaf-bf4e4c438800")
                {
                    ViewBag.lname = ms[0].Lineno;
                }
                else
                {
                    if (string.IsNullOrEmpty(ms[0].Lineno))
                    {
                        ViewBag.lname = ms[0].linename;
                    }
                    else
                    {
                        ViewBag.lname = ms[0].Lineno + "-" + ms[0].linename;
                    }
                }

                if (ms.Any(p => p.userid == UserInfo.userid && p.Leader == 1))
                {
                    ViewBag.leader = "1";
                }
                ViewBag.mstatus = ms[0].mstatus;
                ViewBag.recnt   = ms.Where(p => !string.IsNullOrEmpty(p.Mono)).Count();

                if (ViewBag.mstatus == "3" && ViewBag.tstatus == "0" && ViewBag.leader == "1")
                {
                    ViewBag.recnt = bll.GetReplayerCnt(tid);
                }
                //if (ms[0].mstatus == "3" && ms[0].Teamstatus == 1)
                //{
                //  int cnt=  bll.GetFOrders(ms[0].Match_Id);
                //  ViewBag.quarty = 500 - cnt;
                //}
            }
            else
            {
                ViewBag.match    = "";
                ViewBag.rq       = "";
                ViewBag.dw       = "";
                ViewBag.leader   = "";
                ViewBag.tstatus  = "";
                ViewBag.begin    = "";
                ViewBag.mstatus  = "";
                ViewBag.teamtype = "";
            }

            ViewBag.tid = tid;
            return(View(ms));
        }
Exemple #30
0
        public JsonResult getplayer(string tid, string r)
        {
            TeamRegBll bll = new TeamRegBll();

            return(RepReurnOK(bll.GetMatchuserByTeamId(tid)));
        }