Ejemplo n.º 1
0
        public static string getReturnOrder(string order, string remove)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();

            if (remove.ToInt() == 0)
            {
                var or = RefundGoodController.GetOrderByID(order.ToInt());
                if (or != null)
                {
                    HttpContext.Current.Response.Cookies["refund"].Value = or.ID + "|" + or.TotalPrice;
                    return(serializer.Serialize(or));
                }
                else
                {
                    return(serializer.Serialize(null));
                }
            }
            else
            {
                HttpContext.Current.Response.Cookies["refund"].Value = "1";
                return(serializer.Serialize(null));
            }
        }