public ActionResult AjaxBindGiftCard(FormCollection form) { string code = Request["Code"].Trim(); string password = Request["Password"]; var temp = GiftCardFacade.LoadGiftCard(code, password); if (temp == null) { return(Json(new { Result = false, Message = "卡号或密码错误,请输入正确的卡号和密码" })); } else if (temp.BindingCustomerSysNo > 0) { return(Json(new { Result = false, Message = "礼品卡已经被绑定,不能重复绑定" })); } else if (temp.EndDate < DateTime.Now) { return(Json(new { Result = false, Message = "礼品卡已过期,不能绑定" })); } else { GiftCardFacade.BindGiftCard(code, this.CurrUser.UserSysNo); return(Json(new { Result = true, Message = "礼品卡绑定成功" })); } }