/// <summary> /// the constructor /// </summary> /// <param name="book"></param> /// <param name="shoppingCard"></param> public BookControl(Book book, ShoppingCard shoppingCard) { this.book = book; InitializeComponent(); this.shoppingCard = shoppingCard; txtbxAuthor.Text = book.Author; lbPrice.Text = book.Price.ToString() + "₺ " + book.Sale.ToString() + "%"; txtbxPublisher.Text = book.Publisher; txtbxName.Text = book.Name; pctrxPhoto.Image = book.Photo1; lbPrice1.Text = (book.Price * (100 - book.Sale) / 100).ToString() + "₺"; }
/// <summary> /// the constructor /// </summary> /// <param name="music"></param> /// <param name="shoppingCard"></param> public MusicCdControl(MusicCD music, ShoppingCard shoppingCard) { InitializeComponent(); this.musicCD = music; this.shoppingCard = shoppingCard; txtbxName.Text = musicCD.Name; lbPrice.Text = musicCD.Price.ToString() + "₺ " + musicCD.Sale.ToString() + "%"; txtbxSinger.Text = musicCD.Singer; lbPrice1.Text = musicCD.Price.ToString(); pctrxPhoto.Image = musicCD.Photo1; lbPrice1.Text = (music.Price * (100 - music.Sale) / 100).ToString() + "₺"; }
public ShoppingCartControlc(Product product, ShoppingCard shoppingCart) { this.shoppingCart = shoppingCart; this.product = product; InitializeComponent(); ptbxProductPhoto.Image = product.Photo1; lbName.Text = product.Name; lbSale.Text = product.Sale.ToString() + "%"; lbPrice.Text = ((double)product.Price * (1 - (double)product.Sale / 100)).ToString() + "₺"; nudpiece.Value = shoppingCart.items[product.Id].quantity; }
public MagazineControl(Magazine magazine, ShoppingCard shoppingCard) { this.magazine = magazine; InitializeComponent(); this.shoppingCard = shoppingCard; txtbxName.Text = magazine.Name; lbPrice.Text = magazine.Price.ToString() + "₺ " + magazine.Sale.ToString() + "%"; txtbxIssue.Text = magazine.Issue; lbPrice1.Text = magazine.Price.ToString(); pctrxPhoto.Image = magazine.Photo1; lbPrice1.Text = (magazine.Price * (100 - magazine.Sale) / 100).ToString() + "₺"; }
/// <summary> /// the constructor /// </summary> /// <param name="magazine"></param> /// <param name="shoppingCard"></param> public MagazineForm(Magazine magazine, ShoppingCard shoppingCard) { InitializeComponent(); this.magazine = magazine; this.shoppingCard = shoppingCard; this.Text = magazine.Name; lbType.Text = "Type : " + magazine.Mtype.ToString(); lbMagazineName.Text = magazine.Name; txtbxDescription.Text = magazine.Description; pctrbxCoverPhoto.Image = this.magazine.Photo1; lbIssue.Text = "Issue : " + this.magazine.Issue; lbPrice.Text = magazine.Price.ToString() + "₺ " + magazine.Sale.ToString() + "%"; lbPrice2.Text = (magazine.Price * (100 - magazine.Sale) / 100).ToString() + "₺"; }
/// <summary> /// the constructor /// </summary> /// <param name="musicCD"></param> /// <param name="shoppingCard"></param> public MusicCdForm(MusicCD musicCD, ShoppingCard shoppingCard) { InitializeComponent(); this.shoppingCard = shoppingCard; this.Text = musicCD.Name; this.musicCD = musicCD; lbType.Text = "Type : " + this.musicCD.Mcdtype.ToString(); lbMusicCDName.Text = this.musicCD.Name; lbsinger.Text = "Singer : " + this.musicCD.Singer; txtbxDescription.Text = "Description : " + this.musicCD.Description; pctrbxCoverPhoto.Image = this.musicCD.Photo1; lbPrice.Text = musicCD.Price.ToString() + "₺ " + musicCD.Sale.ToString() + "%"; lbPrice2.Text = (musicCD.Price * (100 - musicCD.Sale) / 100).ToString() + "₺"; }
/// <summary> /// constructor /// </summary> /// <param name="card"></param> public ShoppingCartForm(ShoppingCard card) { shoppingCard = card; InitializeComponent(); for (int i = 0; i < shoppingCard.items.Count; i++) { flpList.Controls.Add(shoppingCard.shoppingCartControlcs[i]); } int year = DateTime.Now.Year; for (int i = 0; i < 5; i++) { cbYear.Items.Add(year.ToString()); year++; } }
/// <summary> /// the constructor /// </summary> /// <param name="book"></param> /// <param name="shoppingCard"></param> public BookForm(Book book, ShoppingCard shoppingCard) { InitializeComponent(); this.Text = book.Name; this.shoppingCard = shoppingCard; this.book = book; lbBookName.Text = this.book.Name; lbPublisher.Text = "Publisher : " + this.book.Publisher; lbBookAuthor.Text = "Author : " + this.book.Author; pctrbxCoverPhoto.Image = this.book.Photo1; txtbxDescription.Text = "Description : " + this.book.Description; lbNoOfPage.Text = "Page : " + this.book.Page.ToString(); lbType.Text = "Type : " + this.book.type.ToString(); lbLanguage.Text = "Language : " + this.book.l_anguage.ToString(); lbSize.Text = "Size : " + this.book.size; lbPrice.Text = book.Price.ToString() + "₺ " + book.Sale.ToString() + "%"; lbPrice2.Text = (book.Price * (100 - book.Sale) / 100).ToString() + "₺"; }