Beispiel #1
0
        public PartInfoForm(Car _selectedCar, Part _selectedPart, Context db, MainMenu mm)
        {
            InitializeComponent();
            this.db            = db;
            this.mm            = mm;
            this._selectedCar  = _selectedCar;
            this._selectedPart = _selectedPart;

            //    infoTbCar.Text = _selectedCar.Make + " " + _selectedCar.Model + " an " + _selectedCar.Year + " motor "
            //        + _selectedCar.Capacity + " pret: " + _selectedCar.Price;
            label6.Text      = _selectedPart.Name;
            label7.Text      = _selectedPart.Details;
            infoTbPrice.Text = string.Concat(_selectedPart.Price);
            infoTbQty.Text   = string.Concat(_selectedPart.Quantity);
            label8.Text      = _selectedPart.Oem_Code;
            label11.Text     = _selectedPart.Color;
            //  infoTbBarcode.Text = _selectedPart.BarCode;
            if (_selectedPart.Content != null)
            {
                pictureBox1.Image    = ImageServices.byteArrayToImage(_selectedPart.Content);
                pictureBox1.SizeMode = PictureBoxSizeMode.CenterImage;
            }
            else
            {
                pictureBox1.Image = Image.FromFile("./Pics/logo2.png");
            }
        }