コード例 #1
0
 public AddItemWindow(Catalog prod, MainWindow mw)
 {
     InitializeComponent();
     Product = prod;
     this.mw = mw;
     ProductNameLb.Content = prod.ProductName;
     ItemDescriptionTb.Text = prod.FullDescription;
 }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Catalogs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCatalogs(Catalog catalog)
 {
     base.AddObject("Catalogs", catalog);
 }
コード例 #3
0
 /// <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;
 }
コード例 #4
0
ファイル: FileInput.cs プロジェクト: JoeLee9981/FullContact
        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;
        }