Exemplo n.º 1
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");
 }
Exemplo n.º 2
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 });
 }