Exemplo n.º 1
0
 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 = "修改失败,请重新修改!!!" });
 }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
 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 = "注册失败,请重新注册!!!" });
 }
Exemplo n.º 4
0
        /// <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;
            }
        }