Ejemplo n.º 1
0
 /// <summary>
 /// Action for Bind the product from category and suvbcategory
 /// </summary>
 /// <param name="pCategoryID">Id of a category for which sub category needs to be searched</param>
 /// <param name="pSubCategoryID">Id of a SubCategory for which sub category needs to be searched</param>
 /// <returns></returns>
 public JsonResult BindProduct(int pCategoryID, int pSubCategoryID)
 {
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     MasterlistEngine masterEngine = new MasterlistEngine();
     string response = masterEngine.GetProductListJSON(Request.Cookies["sessionkey"].Value, pCategoryID.ToString(), pSubCategoryID.ToString());
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     List<Common.DTO.Product> products = new List<Common.DTO.Product>();
     products = (List<Common.DTO.Product>)Serializer.JSONStringToObject<List<Common.DTO.Product>>(responseObject.ResultObjectJSON);
     return Json(products, JsonRequestBehavior.AllowGet);
 }