public ActionResult DoModifyPass(ww_User model) { model.Password = FormsAuthentication.HashPasswordForStoringInConfigFile(model.Password, "MD5"); if (BllBuilder.BuilUser().UpdateUser(model)) { return RedirectToAction("Alert", "Login", new { alert = "修改成功!!!" }); } return RedirectToAction("Alert", "Login", new { alert = "修改失败,请重新修改!!!" }); }
/// <summary> /// 注册新用户 /// </summary> /// <param name="model"></param> /// <returns></returns> public dynamic AddUser(ww_User model) { model.BoolDel = false; try { db.BeginTransaction(); db.Insert(model); db.CompleteTransaction(); return true; } catch (Exception) { return false; } //List<ww_Re> i= list.ToList(); //return list; }
public ActionResult Register(ww_User model) { model.Password = FormsAuthentication.HashPasswordForStoringInConfigFile(model.Password, "MD5"); if (BllBuilder.BuilUser().AddUser(model)) { return RedirectToAction("Alert", "Login", new { alert = "注册成功!!!" }); } return RedirectToAction("Alert", "Login", new { alert = "注册失败,请重新注册!!!" }); }
/// <summary> /// 修改密码 /// </summary> /// <param name="model"></param> /// <returns></returns> public dynamic UpdateUser(ww_User model) { model.BoolDel = false; try { db.BeginTransaction(); db.Update(model); db.CompleteTransaction(); return true; } catch (Exception) { return false; } }