예제 #1
0
 private void BindExistAccessoriesValue()
 {
     List<Maticsoft.Model.Shop.Products.AccessoriesValue> list = new Maticsoft.BLL.Shop.Products.AccessoriesValue().AccessoriesByProductId(this.ProductId);
     if ((list != null) && (list.Count > 0))
     {
         StringBuilder strExistAcc = new StringBuilder();
         list.ForEach(delegate (Maticsoft.Model.Shop.Products.AccessoriesValue info) {
             strExistAcc.Append(info.ProductAccessoriesSKU);
             strExistAcc.Append(",");
         });
         this.hfSelectedData.Value = strExistAcc.ToString();
     }
 }
예제 #2
0
 private void ProductAccessoriesValues(HttpContext context)
 {
     JsonObject obj2 = new JsonObject();
     string str = context.Request.Params["pid"];
     if (!string.IsNullOrWhiteSpace(str))
     {
         long productId = Globals.SafeLong(str, (long) (-1L));
         List<Maticsoft.Model.Shop.Products.AccessoriesValue> list = new Maticsoft.BLL.Shop.Products.AccessoriesValue().AccessoriesByProductId(productId);
         if ((list != null) && (list.Count > 0))
         {
             StringBuilder strAccValues = new StringBuilder();
             list.ForEach(delegate (Maticsoft.Model.Shop.Products.AccessoriesValue info) {
                 strAccValues.Append(info.ProductAccessoriesSKU);
                 strAccValues.Append(",");
             });
             obj2.Put("STATUS", "SUCCESS");
             obj2.Put("DATA", strAccValues.ToString());
         }
         else
         {
             obj2.Put("STATUS", "FAILED");
         }
     }
     else
     {
         obj2.Put("STATUS", "FAILED");
     }
     context.Response.Write(obj2.ToString());
 }