public ActionResult GetBatchPackings(string ID) { ViewBag.PackingProductList = ProductLogic.GetDrums(); var batchData = PackingProcessLogic.GetBatchProductShadePacking(ID).ToList(); if (batchData != null) { foreach (var item in batchData) { var bPacking = BatchLogic.GetBatchDetails(Convert.ToInt32(ID)); if (bPacking != null) { item.BatchPackings = bPacking.ToList(); } } } return(PartialView("ProductPackingInfo", batchData)); }