private void GravarButton_Click(object sender, EventArgs e) { if (bDirty) { bDirty = false; Sistema_bll sistema_Class = new Sistema_bll(_connection); obscidadao reg = new obscidadao(); reg.Codigo = _codigo; reg.Userid = sistema_Class.Retorna_User_LoginId(Properties.Settings.Default.LastUser); reg.timestamp = DateTime.Now; reg.Obs = HistoricoText.Text; Cidadao_bll cidadao_Class = new Cidadao_bll(_connection); Exception ex = cidadao_Class.Incluir_observacao_cidadao(reg); if (ex != null) { ErrorBox eBox = new ErrorBox("Atenção", ex.Message, ex); eBox.ShowDialog(); } else { Carrega_Lista(); } } }