Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductChangeControl"/> class.
 /// </summary>
 /// <param name="ctrl"> main conctroller </param>
 public ProductChangeControl(MainController ctrl)
 {
     InitializeComponent();
     control = ctrl;
     oldProd = null;
     //add initialization
     NameTxt.Text = "noname";
     DescriptionTxt.Text = string.Empty;
     ManufacturerTxt.Text = string.Empty;
     PriceTxt.Text = 0.ToString();
     pictureBox.Image = Properties.Resources.no_photo;
     pictureBox.SizeMode = PictureBoxSizeMode.Zoom;
 }
Exemplo n.º 2
0
 public Product Clone()
 {
     Product res = new Product();
     res.Image = (byte[])Image.Clone();
     res.Name = (string)Name.Clone();
     res.Describe = (string)Describe.Clone();
     res.Maufacture = (string)Maufacture.Clone();
     res.Price = Price;
     res.ID = ID;
     return res;
 }