/// <summary> /// Constructor with parameters. /// Populate the current form with the item's data. /// </summary> /// <param name="parent"></param> /// <param name="item"></param> public EditCategoryForm(MainForm parent, ListViewItem item) { this.parent = parent; this.item = item; InitializeComponent(); populateForm(); }
/// <summary> /// Constructor. /// Populate the current textboxes with the product's data. /// Append the categories in a selectbox. /// </summary> /// <param name="parent"></param> /// <param name="item"></param> public EditProductForm(MainForm parent, ListViewItem item) { this.parent = parent; this.item = item; InitializeComponent(); comboBoxCategory.SelectedIndex = 0; populateCategoriesCombobox(); populateForm(); }
/// <summary> /// Constructor. /// Used when adding a new product. /// Few elements are altered. (ie. the title of the form + hide the duplicate button) /// </summary> /// <param name="parent"></param> public EditProductForm(MainForm parent) { this.parent = parent; InitializeComponent(); comboBoxCategory.SelectedIndex = 0; populateCategoriesCombobox(); this.label1.Text = "Adaugare produs"; this.Text = "Adaugare produs"; this.btnDuplicate.Visible = false; this.btnExport.Visible = false; }
/// <summary> /// Constructor with parameter. /// Attach to the current form a parent. /// </summary> /// <param name="parent"></param> public EditCategoryForm(MainForm parent) { this.parent = parent; InitializeComponent(); this.label1.Text = "Adauga categorie"; }