示例#1
0
 private void btnCadastrar_Click(object sender, EventArgs e)
 {
     try {
         var result = new FrmCores().ShowDialog();
         if (result == DialogResult.OK)
         {
             PreencherListView(GetListaCor());
         }
     } catch (Exception ex) {
         ex.Message.ShowError();
     }
 }
示例#2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            try {
                if (!HaItemSelecionado())
                {
                    return;
                }

                var id     = GetCodigoItemSelecionado();
                var result = new FrmCores(id).ShowDialog();
                if (result == DialogResult.OK)
                {
                    PreencherListView(GetListaCor());
                }
            } catch (Exception ex) {
                ex.Message.ShowError();
            }
        }