private void newProduct_Click(object sender, EventArgs e) { sidePanel.Height = newProduct.Height; sidePanel.Top = newProduct.Top; addProduct tab = new addProduct(); MainControlClass.showControl(tab, content); }
private void reports_Click(object sender, EventArgs e) { sidePanel.Height = newProduct.Height; sidePanel.Top = reports.Top; ShowReports tab = new ShowReports(); MainControlClass.showControl(tab, content); }
private void dshboard_Click(object sender, EventArgs e) { sidePanel.Height = dshboard.Height; sidePanel.Top = dshboard.Top; DashBrd d1 = new DashBrd(); MainControlClass.showControl(d1, content); }
private void manageProduct_Click(object sender, EventArgs e) { sidePanel.Height = manageProduct.Height; sidePanel.Top = manageProduct.Top; ShowProducts tab = new ShowProducts(); MainControlClass.showControl(tab, content); }
private void next_Click(object sender, EventArgs e) { if (title.Text == null || description.Text == null || tags.Text == null || price.Text == null || compareToPrice.Text == null || costPerItem.Text == null) { MessageBox.Show("You have to fill up all the fields please "); } else { product.title = title.Text; product.description = description.Text; product.category_id = category.selectedIndex.ToString(); product.product_brand = brand.selectedValue.ToString(); product.product_tags = tags.Text; product.product_gender = gender.selectedValue.ToString(); product.price = double.Parse(price.Text); product.old_price = double.Parse(compareToPrice.Text); product.cost_per_item = double.Parse(costPerItem.Text); addProduct02 d1 = new addProduct02(product); MainControlClass.showControl(d1, this); } }
private void next_Click(object sender, EventArgs e) { FinalProduct product = new FinalProduct(); product.id = carrier.id; product.title = title.Text; product.product_gender = gender.selectedValue.ToString(); product.description = description.Text; product.product_tags = tags.Text; product.category_id = category.selectedIndex.ToString(); product.product_brand = brand.selectedValue.ToString(); product.price = double.Parse(price.Text); product.old_price = double.Parse(compareToPrice.Text); product.cost_per_item = double.Parse(costPerItem.Text); product.product_images = carrier.product_images; product.product_sku = carrier.product_sku; product.product_barcode = carrier.product_barcode; product.product_quantity = carrier.product_quantity; product.product_weight = carrier.product_weight; product.product_height = carrier.product_height; updateProduct02 nextStep = new updateProduct02(product); MainControlClass.showControl(nextStep, this); }
private void back_Click(object sender, EventArgs e) { updateProduct d1 = new updateProduct(); MainControlClass.showControl(d1, this); }
private void ShowReports_Load(object sender, EventArgs e) { sidePanel.Width = all.Width; sidePanel.Left = all.Left; int y = 32; List <ReviewClass> reviewList = Review.Page_load(); foreach (ReviewClass review in reviewList) { Label used_email = new Label(); Label rating = new Label(); Label date = new Label(); Button show_product = new Button(); Button delete_product = new Button(); // // productTitle // used_email.AutoSize = true; used_email.Location = new Point(65, y); used_email.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); used_email.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); used_email.Name = "productTitle"; used_email.Text = review.email; // // itemsInStock // rating.AutoSize = true; rating.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); rating.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); rating.Location = new Point(329, y); rating.Name = "itemsInStock"; rating.Size = new Size(18, 23); rating.TabIndex = 36; rating.Text = review.starts.ToString(); // // inStock // date.AutoSize = true; date.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); date.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); date.Location = new Point(574, y); date.Name = "inStock"; date.Size = new Size(59, y); date.TabIndex = 37; date.Text = review.date.ToString(); // // show // show_product.FlatAppearance.BorderColor = Color.White; show_product.FlatAppearance.BorderSize = 0; show_product.FlatAppearance.MouseDownBackColor = Color.White; show_product.FlatAppearance.MouseOverBackColor = Color.White; show_product.FlatStyle = FlatStyle.Flat; show_product.BackgroundImage = Image.FromFile(@"D:\ProjectsGIT\FinalPFE\bingoDesk\assets\hide01.png"); show_product.Location = new Point(871, y); show_product.Name = "show"; show_product.Size = new Size(24, 24); show_product.TabIndex = 38; show_product.UseVisualStyleBackColor = true; // // delete // delete_product.FlatAppearance.BorderColor = Color.White; delete_product.FlatAppearance.BorderSize = 0; delete_product.FlatAppearance.MouseDownBackColor = Color.White; delete_product.FlatAppearance.MouseOverBackColor = Color.White; delete_product.FlatStyle = FlatStyle.Flat; delete_product.BackgroundImage = Image.FromFile(@"D:\ProjectsGIT\FinalPFE\bingoDesk\assets\trash01.png"); delete_product.Location = new Point(931, y); delete_product.Name = "delete"; delete_product.Size = new Size(24, 24); delete_product.TabIndex = 38; delete_product.UseVisualStyleBackColor = true; y += 35 + 10; this.scrollable.Controls.Add(used_email); this.scrollable.Controls.Add(rating); this.scrollable.Controls.Add(date); this.scrollable.Controls.Add(show_product); this.scrollable.Controls.Add(delete_product); scrollable.AutoScroll = false; scrollable.HorizontalScroll.Enabled = false; scrollable.HorizontalScroll.Visible = false; scrollable.HorizontalScroll.Maximum = 0; scrollable.AutoScroll = true; show_product.Click += (snd, EventArgs) => { ReplayRec d1 = new ReplayRec(review.review_id, review.email, review.last_name, review.first_name, review.review); MainControlClass.showControl(d1, this); }; delete_product.Click += (snd, EventArgs) => { Review.Delete_review(review.review_id); ShowReports_Load(sender, e); }; } }
private void discard_Click(object sender, EventArgs e) { DashBrd d1 = new DashBrd(); MainControlClass.showControl(d1, this); }
private void ShowProducts_Load(object sender, EventArgs e, int gender) { sidePanel.Width = all.Width; sidePanel.Left = all.Left; int y = 32; string sex = null; if (gender == 1) { sex = "Man"; } else if (gender == 2) { sex = "Woman"; } else if (gender == 3) { sex = "Kid"; } this.scrollable.Controls.Clear(); List <FinalProduct> productList = Product.Page_load(); foreach (FinalProduct product in productList) { if (product.product_gender.Equals(sex)) { PictureBox productPic = new PictureBox(); Label product_title = new Label(); Label item_inStock = new Label(); Label in_stock = new Label(); Label categories = new Label(); Label separator = new Label(); Label brands = new Label(); Button hide_product = new Button(); Button edit_product = new Button(); Button delete_product = new Button(); // // productPicture // var serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); List <String> firstImage = (List <String>)serializer.Deserialize(product.product_images, typeof(List <String>)); productPic.Location = new Point(54, y - 30); productPic.Name = "productPicture"; productPic.Size = new Size(155, 81); productPic.TabIndex = 27; productPic.SizeMode = PictureBoxSizeMode.StretchImage; productPic.TabStop = false; productPic.ImageLocation = @"C:\xampp\htdocs\bingoFinal\public\productImages\" + firstImage[0].ToString(); // // productTitle // product_title.AutoSize = true; product_title.Location = new Point(235, y); product_title.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); product_title.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); product_title.Name = "productTitle"; item_inStock.Size = new Size(18, 23); product_title.Text = product.title; // // itemsInStock // item_inStock.AutoSize = true; item_inStock.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); item_inStock.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); item_inStock.Location = new Point(535, y); item_inStock.Name = "itemsInStock"; item_inStock.Size = new Size(18, 23); item_inStock.TabIndex = 36; item_inStock.Text = product.product_quantity.ToString(); // // inStock // in_stock.AutoSize = true; in_stock.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); in_stock.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); in_stock.Location = new Point(566, y); in_stock.Name = "inStock"; in_stock.Size = new Size(59, y); in_stock.TabIndex = 37; in_stock.Text = "In Stock"; // // type // categories.AutoSize = true; categories.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); categories.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); categories.Location = new Point(693, y); categories.Name = "type"; categories.Size = new Size(84, 23); categories.TabIndex = 37; categories.Text = product.product_gender; // // brand // brands.AutoSize = true; brands.Font = new Font("Poppins Medium", 13F, FontStyle.Regular, GraphicsUnit.Pixel, ((byte)(0))); brands.ForeColor = Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); brands.Location = new Point(809, y); brands.Name = "brand"; brands.Size = new Size(37, 23); brands.TabIndex = 37; brands.Text = product.product_brand; // // hide // hide_product.FlatAppearance.BorderColor = Color.White; hide_product.FlatAppearance.BorderSize = 0; hide_product.FlatAppearance.MouseDownBackColor = Color.White; hide_product.FlatAppearance.MouseOverBackColor = Color.White; hide_product.FlatStyle = FlatStyle.Flat; hide_product.BackgroundImage = Image.FromFile(@"D:\ProjectsGIT\FinalPFE\bingoDesk\assets\hide01.png"); hide_product.Location = new Point(910, y); hide_product.Name = "hide"; hide_product.Size = new Size(24, 24); hide_product.TabIndex = 38; hide_product.UseVisualStyleBackColor = true; // // edit // edit_product.FlatAppearance.BorderColor = Color.White; edit_product.FlatAppearance.BorderSize = 0; edit_product.FlatAppearance.MouseDownBackColor = Color.White; edit_product.FlatAppearance.MouseOverBackColor = Color.White; edit_product.FlatStyle = FlatStyle.Flat; edit_product.BackgroundImage = Image.FromFile(@"D:\ProjectsGIT\FinalPFE\bingoDesk\assets\gear01.png"); edit_product.Location = new Point(940, y); edit_product.Name = "edit"; edit_product.Size = new Size(24, 27); edit_product.TabIndex = 38; edit_product.UseVisualStyleBackColor = true; // // delete // delete_product.FlatAppearance.BorderColor = Color.White; delete_product.FlatAppearance.BorderSize = 0; delete_product.FlatAppearance.MouseDownBackColor = Color.White; delete_product.FlatAppearance.MouseOverBackColor = Color.White; delete_product.FlatStyle = FlatStyle.Flat; delete_product.BackgroundImage = Image.FromFile(@"D:\ProjectsGIT\FinalPFE\bingoDesk\assets\trash01.png"); delete_product.Location = new Point(970, y); delete_product.Name = "delete"; delete_product.Size = new Size(24, 24); delete_product.TabIndex = 38; delete_product.UseVisualStyleBackColor = true; // // separator // separator.BackColor = Color.Red; separator.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; separator.ForeColor = Color.Red; separator.Location = new Point(64, y + 10); separator.Name = "label8"; separator.Size = new Size(1008, 1); separator.TabIndex = 25; y += productPic.Height + 10; this.scrollable.Controls.Add(productPic); this.scrollable.Controls.Add(product_title); this.scrollable.Controls.Add(item_inStock); this.scrollable.Controls.Add(in_stock); this.scrollable.Controls.Add(categories); this.scrollable.Controls.Add(brands); this.scrollable.Controls.Add(hide_product); this.scrollable.Controls.Add(edit_product); this.scrollable.Controls.Add(delete_product); scrollable.AutoScroll = false; scrollable.HorizontalScroll.Enabled = false; scrollable.HorizontalScroll.Visible = false; scrollable.HorizontalScroll.Maximum = 0; scrollable.AutoScroll = true; hide_product.Click += (snd, EventArgs) => { Product.Hide_product(product.id); }; delete_product.Click += (snd, EventArgs) => { Product.Delete_product(product.id); }; edit_product.Click += (snd, EventArgs) => { updateProduct update = new updateProduct(product); MainControlClass.showControl(update, this); }; } } }
private void back_Click(object sender, EventArgs e) { ShowReports d1 = new ShowReports(); MainControlClass.showControl(d1, this); }