public AddItemWindow(Catalog prod, MainWindow mw) { InitializeComponent(); Product = prod; this.mw = mw; ProductNameLb.Content = prod.ProductName; ItemDescriptionTb.Text = prod.FullDescription; }
/// <summary> /// Deprecated Method for adding a new object to the Catalogs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCatalogs(Catalog catalog) { base.AddObject("Catalogs", catalog); }
/// <summary> /// Create a new Catalog object. /// </summary> /// <param name="productID">Initial value of the ProductID property.</param> public static Catalog CreateCatalog(global::System.Int32 productID) { Catalog catalog = new Catalog(); catalog.ProductID = productID; return catalog; }
private Catalog CreateCatalogFromLine(string line) { string[] data = line.Split(','); decimal price; decimal.TryParse(data[4], out price); Catalog catalog = new Catalog(); catalog.ProductName = data[0]; catalog.Category = data[1]; catalog.ShortDescription = data[2]; catalog.FullDescription = data[3]; catalog.Price = price; return catalog; }