Esempio n. 1
0
        private void buttonNewCategory_Click(object sender, EventArgs e)
        {
            FormPartsNew fpn = new FormPartsNew("", "", "");

            fpn.ShowDialog(this);

            if (fpn.IsConfirmed)
            {
                buildListView(fpn._Category);
            }
        }
Esempio n. 2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormPartsNew fpn = new FormPartsNew(this.comboBoxCategory.Text, "", "");

            fpn.ShowDialog(this);

            if (fpn.IsConfirmed)
            {
                insertPartRow(this.comboBoxCategory.Text, fpn._Description, fpn._Price);

                buildListView("");
            }
        }
Esempio n. 3
0
        private void buttonModify_Click(object sender, EventArgs e)
        {
            ListViewItem lvi = getSelectedPart();

            if (lvi == null)
            {
                return;
            }

            string description, price;

            getListViewParts(lvi, out description, out price);

            FormPartsNew fpn = new FormPartsNew(this.comboBoxCategory.Text, description, price);

            fpn.ShowDialog(this);

            if (fpn.IsConfirmed)
            {
                updatePartRow(this.comboBoxCategory.Text, fpn._Description, fpn._Price);

                buildListView("");
            }
        }