Beispiel #1
0
        private void btCadastar_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.AppStarting;
            this.Refresh();

            RecuperarDadosTextBox();

            if (this.projeto.Save())
            {
                btLimpar_Click(sender, e);
                Decorator.MessageBoxSuccess("Registro criado com sucesso!");
            }
            else if (this.projeto.HasErrorsOn("criar"))
            {
                Decorator.MessageBoxError(this.projeto.ShowMessage("criar"));
            }

            AlternarFormErros();
            Decorator.FocusOnFirstTextBox(pnContent.Controls);
        }
Beispiel #2
0
 private void btLimpar_Click(object sender, EventArgs e)
 {
     Decorator.ClearControls(pnContent.Controls);
     Decorator.FocusOnFirstTextBox(pnContent.Controls);
 }