public BottleDetails(Dashboard sender, Models.Bottle bottle) { InitializeComponent(); if (bottle.Vintage != 0) { lblVintName.Text = $"{bottle.Vintage} {bottle.BottleName}"; } else { lblVintName.Text = $"N/V {bottle.BottleName}"; } lblProducer.Text = bottle.Producer; lblOrigin.Text = $"{bottle.Subregion}, {bottle.Country}"; lblStyle.Text = $"{bottle.StyleOrVarietal}"; lblDrinkRange.Text = $"{bottle.DrinkByStart} - {bottle.DrinkByEnd} (peak {bottle.DrinkByPeak})"; lblSize.Text = bottle.Size; lblCost.Text = $"{bottle.Cost:C}"; lblLocation.Text = bottle.Location; lblType.Text = GetCategoryText(bottle.TypeCode); lblImportance.Text = GetImportanceText(bottle.ImportanceCode); labelPicture.Image = Serializer.DeserializePhoto(bottle.SerializedLabelImage); txtRatings.Text = GetRatingText(bottle.Ratings); txtNotes.Text = bottle.Notes; theBottle = bottle; theSender = sender; }
public BottleDetails(Models.Bottle bottle) { InitializeComponent(); }