Ejemplo n.º 1
0
        private void buttonConvert_Click(object sender, EventArgs e)
        {
            using (AD2DBInitialParams initParams = AD2DBInitialParams.GetParams())
            {
                textBoxLog.Text = string.Empty;

                ServiceLog log = new ServiceLog("ADToAccredit");

                log.AddTextBoxTraceListener(textBoxLog);

                initParams.Log = log;

                this._ProcessedObjectsCount = 0;

                OutputStatus();

                initParams.BeforeProcessADObject += new BeforeProcessADObjectDelegate(initParams_BeforeProcessADObject);

                AD2DBConvertion converter = new AD2DBConvertion(initParams);

                converter.DoConvert();

                OutputStatus();

                OguMechanismFactory.GetMechanism().RemoveAllCache();
                PermissionMechanismFactory.GetMechanism().RemoveAllCache();
            }
        }