Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["wish_ID"] != null && Request.Params["cus_No"] != null &&
                Request.Params["stock_ID"] != null && Request.Params["wish_count"] != null && Request.Params["wish_price"] != null)
            {
                wl = new WishList_VO()
                {
                    Wish_ID    = Request.Params["wish_ID"],
                    Cus_ID     = int.Parse(Request.Params["cus_No"]),
                    StockID    = Request.Params["stock_ID"],
                    Wish_count = int.Parse(Request.Params["wish_count"]),
                    Wish_price = int.Parse(Request.Params["wish_price"])
                };

                wish.InsertWishList(wl);
                json = "1";
            }
            else
            {
                json = "1901";
            }


            Response.Clear();
            Response.Write(json);
            Response.Flush();
            Response.End();
        }
Esempio n. 2
0
        public void InsertWishList(WishList_VO wl)
        {
            string query = "InsertWishList";

            SqlParameter[] sqls =
            {
                new SqlParameter("wish_ID",    wl.Wish_ID),
                new SqlParameter("cus_No",     wl.Cus_ID),
                new SqlParameter("stock_ID",   wl.StockID),
                new SqlParameter("wish_count", wl.Wish_count),
                new SqlParameter("wish_price", wl.Wish_price)
            };
            try
            {
                con.SendExqueteQuery(query, sqls);
            }
            catch (Exception)
            {
                throw;
            }
        }