Example #1
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            var giftLogic     = new GiftOperateLogic();
            var responseModel = Invoke(giftLogic, GiftRequestModel);

            if (HasError)
            {
                return;
            }

            if (responseModel.IsExit)
            {
                Session["GiftCd"]    = responseModel.GiftCd;
                Session["GiftPrice"] = responseModel.Price;
                Session["info"]      = "Gift Card " + responseModel.GiftCd + " đã được thêm vào giò hàng của bạn";
                Response.Redirect("shopping-cart.aspx");
            }
            else
            {
                Session["error"] = "Gift Card bạn nhập không đúng hoặc đã hết hạn, xin vui lòng kiểm tra lại !";
            }
        }
Example #2
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            var giftLogic = new GiftOperateLogic();
            var responseModel = Invoke(giftLogic, GiftRequestModel);
            if (HasError) return;

            if (responseModel.IsExit)
            {
                Session["GiftCd"] = responseModel.GiftCd;
                Session["GiftPrice"] = responseModel.Price;
                Session["info"] = "Gift Card " + responseModel.GiftCd + " đã được thêm vào giò hàng của bạn";
                Response.Redirect("shopping-cart.aspx");
            }
            else
            {
                Session["error"] = "Gift Card bạn nhập không đúng hoặc đã hết hạn, xin vui lòng kiểm tra lại !";
            }
        }