public static Product_Att_KeyService instance() { if (_instance == null) { _instance = new Product_Att_KeyService(); } return(_instance); }
public static IEnumerable <ProductAttr> GetAttsByPID(Guid pid) { List <ProductAttr> attrs = new List <ProductAttr>(); foreach (var item in Product_Att_ValService.instance().GetEnumByProductID(pid).OrderBy(m => m.Short)) { ProductAttr pa = new ProductAttr(); pa.key = Product_Att_KeyService.instance().Single(item.Att_Key_ID); pa.val = item; pa.price = Product_PriceService.instance().GetEnumByKVP(pid, item.Att_Key_ID, item.ID); attrs.Add(pa); } return(attrs); }