Пример #1
0
        public TFCentralAudit()
        {
            InitializeComponent();
            System.Collections.ArrayList cbx = new System.Collections.ArrayList();
            cbx.Add(new Utils.TDataCombo("<TODOS>", string.Empty));
            cbx.Add(new Utils.TDataCombo("UPDATE", "U"));
            cbx.Add(new Utils.TDataCombo("DELETE", "D"));
            tp_evento.DataSource    = cbx;
            tp_evento.DisplayMember = "Display";
            tp_evento.ValueMember   = "Value";

            DataTable tb_tabela = new CamadaDados.Diversos.TCD_Auditoria().BuscarTabelas();

            nm_tabela.Items.Add("<TODOS>");
            if (tb_tabela != null)
            {
                if (tb_tabela.Rows.Count > 0)
                {
                    foreach (DataRow linha in tb_tabela.Rows)
                    {
                        nm_tabela.Items.Add(linha["name"].ToString().Trim().ToUpper());
                    }
                }
            }
            nm_tabela.SelectedIndex = 0;
        }
Пример #2
0
        private void TFCfgAudit_Load(object sender, EventArgs e)
        {
            this.Icon = Utils.ResourcesUtils.TecnoAliance_ICO;
            //Buscar tabelas do banco de dados
            DataTable tb_tabela = new CamadaDados.Diversos.TCD_Auditoria().BuscarTabelas();

            if (tb_tabela != null)
            {
                if (tb_tabela.Rows.Count > 0)
                {
                    foreach (DataRow linha in tb_tabela.Rows)
                    {
                        lbTabelas.Items.Add(linha["name"].ToString().Trim().ToUpper());
                    }
                }
            }
        }