public ActionResult AjaxModifyGiftCardPwd(FormCollection form) { string code = Request["Code"].Trim(); string password = Request["Password"]; string newPassword = Request["NewPassword"]; var temp = GiftCardFacade.LoadGiftCard(code, password); if (temp == null) { return(Json(new { Result = false, Message = "卡号或密码错误,请输入正确的卡号和密码" })); } else if (temp.EndDate < DateTime.Now) { return(Json(new { Result = false, Message = "礼品卡已过期,不能修改密码" })); } else if ((temp.BindingCustomerSysNo > 0 && temp.BindingCustomerSysNo != CurrUser.UserSysNo) || (temp.BindingCustomerSysNo == 0 && temp.CustomerSysNo != CurrUser.UserSysNo)) { return(Json(new { Result = false, Message = "礼品卡未绑定或不属于此帐号,不能修改密码" })); } else { GiftCardFacade.ModifyGiftCardPwd(code, newPassword); return(Json(new { Result = true, Message = "礼品卡密码修改成功" })); } }