示例#1
0
文件: CopyInfo.cs 项目: rempek99/TP1
 public CopyInfo(BookItem bookItem, int stock, double prize, string currency)
 {
     this.bookItem = bookItem;
     this.stock    = stock;
     this.prize    = prize;
     this.currency = currency;
 }
示例#2
0
        public int FindBookItem(string title, string author)
        {
            BookItem pattern = new BookItem(title, author);
            int      key     = -1;

            foreach (BookItem element in dataContext.books.Values)
            {
                if (element.Equals(pattern))
                {
                    key = dataContext.books.FirstOrDefault(x => x.Value.Equals(pattern)).Key;
                    return(key);
                }
            }
            return(key);
        }