private void btnFoodItem_Click(object sender, EventArgs e) { try { pnlContext.Controls.Clear(); FoodItemCtl objFoodItem = new FoodItemCtl(this); objFoodItem.Parent = this; pnlContext.Controls.Add(objFoodItem); objFoodItem.Dock = DockStyle.Fill; } catch (Exception exp) { throw exp; } }
private void foodItemTsButton_Click(object sender, EventArgs e) { try { pnlContext.Controls.Clear(); FoodItemCtl objFoodItem = new FoodItemCtl(this); objFoodItem.ProductType = "Finished"; objFoodItem.Parent = this; objFoodItem.btnAddFoodItem.Visible = true; objFoodItem.btnAddRawMaterial.Visible = false; pnlContext.Controls.Add(objFoodItem); objFoodItem.Dock = DockStyle.Fill; } catch (Exception exp) { throw exp; } }
private void toolStripButtonRawMaterial_Click(object sender, EventArgs e) { try { pnlContext.Controls.Clear(); FoodItemCtl objFoodItem = new FoodItemCtl(this); objFoodItem.btnAddFoodItem.Visible = false; objFoodItem.btnAddRawMaterial.Visible = true; objFoodItem.btnAddRawMaterial.Location = new Point(681, 9); objFoodItem.ProductType = "RawMaterial"; objFoodItem.Parent = this; pnlContext.Controls.Add(objFoodItem); objFoodItem.Dock = DockStyle.Fill; } catch (Exception exp) { throw exp; } }