Ejemplo n.º 1
0
        private void Init(ActivityConfig.ACSeriesRow acsr)
        {
            this.SuspendLayout();
            //flowLayoutPanel1.Controls.Clear();
            if (myRF != null)
            {
                myRF.Dispose();
            }
            myRF                 = null;
            MyACE                = new ACEngine(FM);
            MyACE.myAcSeries     = acsr;
            MyACE.myActivityCode = acsr.ActivityCodeRow;
            MyACE.DoRelFields();
            MyACE.DoStep(ACEngine.Step.RelatedFields0, true);
            MyACE.DoStep(ACEngine.Step.RelatedFields1, true);
            MyACE.DoStep(ACEngine.Step.RelatedFields2, true);
            MyACE.DoStep(ACEngine.Step.RelatedFields3, true);
            MyACE.DoStep(ACEngine.Step.RelatedFields4, true);
            MyACE.DoStep(ACEngine.Step.RelatedFields5, true);
            MyACE.DoStep(ACEngine.Step.RelatedFields6, true);

            BuildForm(acsr);
            if (first)
            {
                foreach (DataView dv in MyACE.relTables.Values)
                {
                    DataTable dt = dv.Table;
                    dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);
                    atLogic.ObjectBE obe = FM.GetBEFromTable(dt);
                    obe.OnUpdate += new atLogic.UpdateEventHandler(ucSSTCase_OnUpdate);
                }
                first = false;
            }
            this.ResumeLayout();
        }
Ejemplo n.º 2
0
 private void UnhookEvents()
 {
     foreach (DataView dv in MyACE.relTables.Values)
     {
         DataTable dt = dv.Table;
         dt.ColumnChanged -= new DataColumnChangeEventHandler(dt_ColumnChanged);
         atLogic.ObjectBE obe = FM.GetBEFromTable(dt);
         obe.OnUpdate -= new atLogic.UpdateEventHandler(ucSSTCase_OnUpdate);
     }
 }