예제 #1
0
        public ActionResult HandleLogout([Bind(Prefix = "logoutModel")] PostRedirectModel model)
        {
            if (ModelState.IsValid == false)
            {
                return(CurrentUmbracoPage());
            }

            if (Members.IsLoggedIn())
            {
                OwinContext.Authentication.SignOut();
            }

            //if there is a specified path to redirect to then use it
            if (model.RedirectUrl.IsNullOrWhiteSpace() == false)
            {
                return(Redirect(model.RedirectUrl));
            }

            //redirect to current page by default
            TempData["LogoutSuccess"] = true;
            return(RedirectToCurrentUmbracoPage());
        }
        public ActionResult HandleLogout([Bind(Prefix = "logoutModel")] PostRedirectModel model)
        {
            if (this.ModelState.IsValid == false)
            {
                return(this.CurrentUmbracoPage());
            }

            if (this.Members.IsLoggedIn())
            {
                //ensure to only clear the default cookies
                this.OwinContext.Authentication.SignOut(DefaultAuthenticationTypes.ApplicationCookie, DefaultAuthenticationTypes.ExternalCookie);
            }

            //if there is a specified path to redirect to then use it
            if (model.RedirectUrl.IsNullOrWhiteSpace() == false)
            {
                return(this.Redirect(model.RedirectUrl));
            }

            //redirect to current page by default
            this.TempData["LogoutSuccess"] = true;
            return(this.RedirectToCurrentUmbracoPage());
        }
예제 #3
0
        //public ActionResult Logout(string ReturnUrl)
        //{
        //    //Response.Cookies.Clear();
        //    //FormsAuthentication.SignOut();
        //    //Session.Abandon();
        //    //System.Web.HttpContext.Current.Session["ReturnUrl"] = ReturnUrl;
        //    return View();
        //    //return Redirect("/Home/Login.do");//TODO:跳转到登录页
        //    //string baseUrl = "http://" + Request.Url.Authority + Url.Action("Login");
        //    //string returnUrl = Url.Action("Index");
        //    //return Redirect(AuthorizeHelper.GetUAMLogOutUrl(baseUrl, returnUrl));
        //}
        //tcfdScatter(顾客姓名),tcfdScatterTe(顾客电话),tcfdPaperId(身份证号), tcfdMemberId(会员编号), tifdReservationID(预约号), tifdRoomId(床位号)
        public ActionResult PostRedirect(int type, string memberid, string idcard, string bid, string phone, string fullname, string cardno, string roomid, string openid)
        {
            /// 1 会员checkin 2 非会员checkin 3 会员详情, 4 储值卡  5 诊疗卡开卡 6 结账 7 查看业务单 8 体验会员开卡


            PostRedirectModel model = new PostRedirectModel();

            model.RedirectType      = type;
            model.tcfdCardId        = cardno;
            model.tcfdMemberId      = memberid;
            model.tcfdPaperId       = idcard;
            model.tcfdScatter       = HttpUtility.UrlEncode(fullname, System.Text.Encoding.UTF8);
            model.tcfdScatterTel    = phone;
            model.tifdReservationID = bid;
            model.tifdRoomId        = roomid;
            model.tcfdOpeid         = openid;
            if (type <= 0)
            {
                throw new ArgumentOutOfRangeException("参数错误");
            }


            return(View(model));
        }