/// <summary> /// Purpose: Grabs all product delivery types by product code /// Accepts: String (Product Code) /// Returns: List<ProductDeliveryType> /// </summary> public List<ProductDeliveryType> GetAllProductDeliveryTypesByProdCode(string prodcd) { List<ProductDeliveryType> pdtypes = new List<ProductDeliveryType>(); try { ProductDeliveryTypeData data = new ProductDeliveryTypeData(); List<QSRDataObjects.ProductDeliveryType> dataPDTypes = data.GetAllProductDeliveryTypesByProdCode(prodcd); foreach (QSRDataObjects.ProductDeliveryType pdt in dataPDTypes) { ProductDeliveryType pdtype = new ProductDeliveryType(); pdtype.ProductDeliveryTypeID = pdt.ProductDeliveryTypeID; pdtype.DeliveryTypeID = Convert.ToInt32(pdt.DeliveryTypeID); pdtype.ProductCode = pdt.ProductCode; pdtype.Created = pdt.Created; pdtype.Modified = pdt.Modified; pdtypes.Add(pdtype); } } catch (Exception ex) { ErrorRoutine(ex, "ProductDeliveryType", "GetAllProductDeliveryTypesByProdCode"); } return pdtypes; }