Пример #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            Methods.saveFormProperties();
            dCategoria obj = new dCategoria(0, true);

            obj.ShowDialog();
            Methods.updateListView(listView, columns, tables, conditions);
        }
Пример #2
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (listView.SelectedItems.Count == 1)
     {
         Methods.saveFormProperties();
         dCategoria obj = new dCategoria(Convert.ToInt32(listView.SelectedItems[0].Text), true);
         obj.ShowDialog();
         Methods.updateListView(listView, columns, tables, conditions);
     }
     else
     {
         MessageBox.Show("Tem de selecionar um item primeiro.");
     }
 }