コード例 #1
0
 public adminSeeProduct(Product p, adminProduct ap)
 {
     InitializeComponent();
     this.p               = p;
     nameTB.Text          = p.getName();
     priceTB.Text         = p.getPrice().ToString();
     richTextBox1.Text    = p.getDetails();
     pictureBox1.Image    = p.getImage();
     pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
     this.ap              = ap;
 }
コード例 #2
0
 public editProduct(Product p, adminProduct ap)
 {
     InitializeComponent();
     this.p  = p;
     this.ap = ap;
     conn    = new DbConnection();
     setCategories(conn.getCategories());
     pictureBox1.Image = p.getImage();
     nameTB.Text       = p.getName();
     priceTB.Text      = p.getPrice().ToString();
     findCat(p.getCategory());
     newDetails = new Dictionary <string, string>();
     setProperties();
     pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
     isHP(p.getHP());
 }
コード例 #3
0
 private void menu_products_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (!isNull)
     {
         disposeFunc(this.getFirstChild());
         apro          = new adminProduct();
         apro.Location = new Point(200, 50);
         this.Controls.Add(apro);
         pageName.Text = "Products";
     }
     else
     {
         apro          = new adminProduct();
         apro.Location = new Point(200, 50);
         this.Controls.Add(apro);
         pageName.Text = "Products";
     }
 }