public ActionResult NewAccount(yhxx yhxx) { baseDAL.AddItem<yhxx>(yhxx); baseDAL.SaveAllChanges(); var yhxxList = baseDAL.Get<yhxx>().ToList(); return Json(yhxxList); }
public String getUserByYwbh(yhxx postYhxx) { var yhxx = baseDAL.Get<yhxx>().FirstOrDefault(c => c.ywbh == postYhxx.ywbh); Session["ywbh"] = yhxx.ywbh; Session["hm"] = yhxx.hm; Session["zz"] = yhxx.zz; Session["yhlx"] = yhxx.yhlx; Session["tel"] = yhxx.tel; Session["gqcs"] = yhxx.gqcs; return "../SellCard/NewCardCharge"; }
public ActionResult UpdateNewUser(yhxx newYhxx) { int ywbhNum; int total = baseDAL.Get<bhIndex>().ToList().Count; if (total == 0) { ywbhNum = 1; } else { ywbhNum = total + 1; } var bhIndex = new bhIndex { ywbh = ywbhNum, }; baseDAL.AddItem<bhIndex>(bhIndex); if (newYhxx.hm != null) { var newUser = baseDAL.Get<yhxx>().FirstOrDefault(c => c.kpbh == newYhxx.kpbh); newUser.hm = newYhxx.hm; newUser.tel = newYhxx.tel; newUser.ywbh = ywbhNum; newUser.gqcs = 1; Session["ywbh"] = newUser.ywbh; Session["hm"] = newUser.hm; Session["zz"] = newUser.zz; Session["yhlx"] = newUser.yhlx; Session["tel"] = newUser.tel; Session["gqcs"] = newUser.gqcs; baseDAL.SaveAllChanges(); } else { Session["ywbh"] = ywbhNum; Session["hm"] = null; Session["zz"] = null; Session["yhlx"] = newYhxx.yhlx; Session["tel"] = null; Session["gqcs"] = 0; } return Json(ywbhNum); }
public ActionResult chongzhi(yhxx Yhxx) { DateTime now = DateTime.Now; now.GetDateTimeFormats(); var yhxx = baseDAL.Get<yhxx>().FirstOrDefault(c => c.ywbh == Yhxx.ywbh); if (yhxx.gqzl == null) { yhxx.gqzl = Yhxx.gqzl; } else { yhxx.gqcs = yhxx.gqcs + 1; yhxx.gqzl = Yhxx.gqzl + yhxx.gqzl; } yhxx.gqrq = now; baseDAL.SaveAllChanges(); return Json(yhxx); }