コード例 #1
0
        public static string Bulid(HttpContext context)
        {
            bool     value   = false;
            string   message = "Fail!";
            XElement result  = new XElement("Result");

            try
            {
                using (ProduceBussiness db = new ProduceBussiness())
                {
                    XElement Store = new XElement("Store");
                    ShopGoodsShowListInfo[] items = db.GetAllShopGoodsShowList();
                    foreach (ShopGoodsShowListInfo g in items)
                    {
                        Store.Add(FlashUtils.CreateShopGoodsShowListInfo(g));
                    }
                    result.Add(Store);
                    value   = true;
                    message = "Success!";
                }
            }
            catch (Exception ex)
            {
                log.Error("ShopGoodsShowList", ex);
            }

            result.Add(new XAttribute("value", value));
            result.Add(new XAttribute("message", message));
            return(csFunction.CreateCompressXml(context, result, "ShopGoodsShowList", true));
        }