Exemplo n.º 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();
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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);
 }
Exemplo n.º 5
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();
 }
Exemplo n.º 6
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);
 }
Exemplo n.º 7
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");
 }