Exemple #1
0
        public ActionResult Edit(VM_EditMember vm_edit_member)
        {
            //if (!VerifyCode(Request["verify"].ToString(), t_hy_member.CellPhone))
            //{
            //    return Json(new { statusCode = "200", message = "验证码错误!请检查后输入", type = "error" });
            //}
            var member = CurrentMember();
            if(member != null)
            {
                db.Entry(member).State = EntityState.Modified;
                member.UpdatedAt = DateTime.Now;
                member.MemberName = vm_edit_member.MemberName;
                member.Password = vm_edit_member.Password;
                member.CellPhone = vm_edit_member.CellPhone;
                db.SaveChanges();

                Logging("更新了会员信息:", (int)OperateTypes.Edit, (int)GenerateSystem.Personal);

                return Json(new { statusCode = "200", message = "信息保存成功!", type = "success" });
            }

            return Json(new { statusCode = "200", message = "信息保存失败!", type = "error" });
        }
Exemple #2
0
 public PartialViewResult Edit()
 {
     var member = CurrentMember();
     if(member != null)
     {
         VM_EditMember vm_edit_member = new VM_EditMember();
         vm_edit_member.MemberName = member.MemberName;
         vm_edit_member.Password = member.Password;
         vm_edit_member.CellPhone = member.CellPhone;
         return PartialView(vm_edit_member);
     }
     return PartialView();
 }