Example #1
0
 public ActionResult gqResult(int id)
 {
     ViewData["CurrMenu"] = "��ȭ����̨";
     bizGQuanMain bm = new bizGQuanMain();
     bizGQuanDe bd = new bizGQuanDe();
     bizUsers bu = new bizUsers();
     GQuanMain model = bm.Get(id);
     Users modelUser = bu.Get(model.UserID);
     ViewData["ID"] = id;
     ViewData["modelMain"] = model;
     ViewData["modelUser"] = modelUser;
     return View();
 }
Example #2
0
 public ActionResult gqResult1(int id)
 {
     ViewData["CurrMenu"] = "��ȭ����̨";
     bizGQuanMain bm = new bizGQuanMain();
     bizGQuanDe bd = new bizGQuanDe();
     bizUsers bu = new bizUsers();
     GQuanMain model = bm.Get(id);
     Users modelUser = bu.Get(model.UserID);
     List<GQuanDeDetail> list = bd.List(id);
     ViewData["modelMain"] = model;
     ViewData["modelUser"] = modelUser;
     return View(list);
 }
Example #3
0
 public ActionResult gqPlay(int id)
 {
     ViewData["CurrMenu"] = "��ȭ����̨";
     bizGQuanMain bm = new bizGQuanMain();
     bizUsers bu = new bizUsers();
     GQuanMain model = bm.Get(id);
     Users modelUser = bu.Get(model.UserID);
     Users modelUserSelf = bu.Get(UserID);
     ViewData["User"] = modelUser;
     if (model.Pwd != "" && id + "-" + model.Pwd != GamePassword && UserID != model.UserID)
     {
         if (model.AddTime.AddHours(1) < DateTime.Now)
         {
             ViewData["id"] = id;
             return View(model);
         }
         else
             return RedirectToAction("gqCheck", new { id = id });
     }
     ViewData["id"] = id;
     ViewData["userSelf"] = modelUserSelf;
     return View(model);
 }
Example #4
0
        public ActionResult gqPlay(FormCollection f)
        {
            bizGQuanDe gd = new bizGQuanDe();
            bizGQuanMain bm = new bizGQuanMain();
            GQuanMain model = bm.Get(int.Parse(f["id"]));

            string result=gd.GameDeal(int.Parse(f["id"]), UserID, byte.Parse(f["btype"]));
            return Content(result);
        }
Example #5
0
 public ActionResult gqmyIndex()
 {
     ViewData["CurrMenu"] = "��ȭ����̨";
     int count;
     int page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
     int pageSize = 20;
     bizGQuanMain bg = new bizGQuanMain();
     List<GQuanMainDetail> list = bg.List(UserID, page - 1, pageSize, out count);
     ViewData["PageList"] = Page.GetPageList("/game/gqmyIndex.html", count, pageSize, page, false);
     return View(list);
 }
Example #6
0
 public ActionResult gqCheck(int id,FormCollection f)
 {
     bizGQuanMain bm = new bizGQuanMain();
     GQuanMain model = bm.Get(id);
     if (id + "-" + model.Pwd == id + "-" + f["pwd"])
     {
         SessionOper.SessionSet(HttpContext, SessionName.GamePassword, id + "-" + f["pwd"]);
         return RedirectToAction("gqPlay", new { id = id });
     }
     else
     {
         TempData["Msg"] = "���벻��ȷ";
         return RedirectToAction("gqCheck", new { id = id });
     }
     //ViewData["id"] = id;
     //return View();
 }
Example #7
0
 public ActionResult gqCheck(int id)
 {
     ViewData["CurrMenu"] = "��ȭ����̨";
     bizGQuanMain bm = new bizGQuanMain();
     bizUsers bu = new bizUsers();
     GQuanMain model = bm.Get(id);
     Users modelUser = bu.Get(model.UserID);
     ViewData["User"] = modelUser;
     ViewData["id"] = id;
     return View(model);
 }
Example #8
0
 public ActionResult gqAdd2(int id, FormCollection f)
 {
     bizGQuanDe bd = new bizGQuanDe();
     bizGQuanMain bg = new bizGQuanMain();
     bizUsers bu = new bizUsers();
     GQuanMain model = bg.Get(id);
     int num = int.Parse(f["num"]);
     string str = "";
     for (int i = 1; i <= num; i++)
     {
         str += f["ju" + i]+"";
     }
     str = str.Trim();
     if (str.Length != model.Num)
     {
         TempData["Msg"] = "���õľ�������ȷ";
         return RedirectToAction("gqAdd2", new { id = id });
     }
     string result = bg.Add(UserID, num, model.JinbiNum, model.Pwd, str);
     if (result != "")
     {
         TempData["Msg"] = result;
         return RedirectToAction("gqAdd2", new { id = id });
     }
     else
         return RedirectToAction("gqIndex");
 }
Example #9
0
 public ActionResult gqAdd(FormCollection f)
 {
     int id;
     bizGQuanMain bg = new bizGQuanMain();
     if (int.Parse(f["jinbiNum"]) > 8000)
     {
         TempData["Msg"] = "ÿ�ְɱ���̫����";
         return View();
     }
     string result = bg.Add(UserID, int.Parse(f["Num"]), int.Parse(f["jinbiNum"]),f["pwd"],out id);
     if (result != "")
     {
         TempData["Msg"] = result;
         return View();
     }
     return RedirectToAction("gqAdd2", new { id = id });
 }