Exemplo 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();
            }
        }
Exemplo n.º 2
0
        public override void OnThreadTaskStart()
        {
            using (AD2DBInitialParams initParams = AD2DBInitialParams.GetParams())
            {
                initParams.Log = this.Params.Log;

                AD2DBConvertion converter = new AD2DBConvertion(initParams);

                converter.DoConvert();

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