private void btnAutoEliminacaoManager_Click(object sender, System.EventArgs e)
        {
            FormAutoEliminacaoEditor formAutoEditor = new FormAutoEliminacaoEditor();
            IDbConnection            conn           = GisaDataSetHelper.GetConnection();

            try
            {
                conn.Open();
                RelatorioRule.Current.LoadAutosEliminacao(GisaDataSetHelper.GetInstance(), conn);
            }
            finally
            {
                conn.Close();
            }

            formAutoEditor.LoadData(GisaDataSetHelper.GetInstance().AutoEliminacao.Select(string.Empty, "Designacao"), "Designacao");
            formAutoEditor.ShowDialog();

            PersistencyHelper.save();
            PersistencyHelper.cleanDeletedData();

            long selectedAutoEliminacaoID = 0;

            if (cbAutoEliminacao.SelectedValue == null)
            {
                selectedAutoEliminacaoID = long.MinValue;
            }
            else
            {
                selectedAutoEliminacaoID = (long)cbAutoEliminacao.SelectedValue;
            }

            rebindToData();
            cbAutoEliminacao.SelectedValue = selectedAutoEliminacaoID;
        }
		private void btnAutoEliminacaoManager_Click(object sender, System.EventArgs e)
		{
			FormAutoEliminacaoEditor formAutoEditor = new FormAutoEliminacaoEditor();
			IDbConnection conn = GisaDataSetHelper.GetConnection();
			try
			{
				conn.Open();
				RelatorioRule.Current.LoadAutosEliminacao(GisaDataSetHelper.GetInstance(), conn);
			}
			finally
			{
				conn.Close();
			}

			formAutoEditor.LoadData(GisaDataSetHelper.GetInstance().AutoEliminacao.Select(string.Empty, "Designacao"), "Designacao");
			formAutoEditor.ShowDialog();

            PersistencyHelper.save();
            PersistencyHelper.cleanDeletedData();

			long selectedAutoEliminacaoID = 0;
			if (cbAutoEliminacao.SelectedValue == null)
				selectedAutoEliminacaoID = long.MinValue;
			else
				selectedAutoEliminacaoID = (long)cbAutoEliminacao.SelectedValue;

			rebindToData();
			cbAutoEliminacao.SelectedValue = selectedAutoEliminacaoID;
		}