Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string        Desc  = txtDesc.Text;
            string        Valor = txtValor.Text;
            string        Id    = txtId.Text;
            List <string> Erros = ContaService.Edit(int.Parse(Id), Desc, Valor);

            if (Erros.Count > 0)
            {
                string textError = "";
                foreach (var erro in Erros)
                {
                    textError += erro + "\r\n";
                }

                MessageBox.Show(textError);
            }
            else
            {
                txtDesc.Text  = "";
                txtValor.Text = "";
                MessageBox.Show("Conta editada com sucesso.");
                EditConta_Load(null, EventArgs.Empty);
            }
        }