public Panel[] QuotePanelComponents(int QuoteId) { // Get the quote! Quote q = new Quote(QuoteId); List<Panel> results = new List<Panel>(); if (q != null) { Pricelist p = new Pricelist(q.PricelistId); if (p != null) { foreach (int productLineId in p.ProductLines) { ProductLine pl = new ProductLine(productLineId); if (pl != null) { Panel newC = new Panel(); newC.title = pl.Name; newC.items = new ExtComponent[2]; // Product grid GridPanel grid = new GridPanel("quoteItemsDDGroup"); grid.store = new Store("PricedProducts", new Proxy(Proxy.ProxyType.AjaxWithJson, "Data.aspx?view=Data&model=GetPricedProductsToQuote&ProductLineId=" + productLineId + "&PricelistId=" + q.PricelistId)); grid.columns = new Column[1]; grid.columns[0] = new Column("Title", "Title"); grid.modelType = "PricedProducts"; newC.items[0] = grid; // Packages grid GridPanel grid2 = new GridPanel("quoteItemsDDGroup"); grid2.store = new Store("PricedPackages", new Proxy(Proxy.ProxyType.AjaxWithJson, "Data.aspx?view=Data&model=GetPricedPackagesToQuote&ProductLineId=" + productLineId + "&PricelistId=" + q.PricelistId)); grid2.columns = new Column[1]; grid2.columns[0] = new Column("Title", "Title"); grid2.modelType = "PricedPackages"; newC.items[1] = grid2; results.Add(newC); } } } } return results.ToArray(); }
public void SaveProductLine(int Id, string Name, string Description, string ProductManager) { ProductLine p = new ProductLine(Id); p.Name = Name; p.Description = Description; p.ProductManager = ProductManager; p.Save(); }
public void CreateProductLine(string Name, string Description, string ProductManager) { ProductLine p = new ProductLine(); p.Name = Name; p.Description = Description; p.ProductManager = ProductManager; p.Create(); }