Пример #1
0
        public bool Recompute(Task task, Record record)
        {
            IClientCommand dataViewCommand = CommandFactory.CreateRecomputeUnitDataViewCommand(task.getTaskTag(), unitId, record.getId());
            ReturnResult   result          = task.DataviewManager.Execute(dataViewCommand);

            if (result.Success)
            {
                control.RefreshDisplay();
            }
            return(result.Success);
        }
Пример #2
0
        /// <summary>
        /// Add new dcValues , set dcValues reference to control and refresh the control.
        /// </summary>
        /// <param name="dcValues"></param>
        /// <param name="rangeData"></param>
        /// <param name="control"></param>
        internal void ApplyDCValuesAndRefreshControl(DcValues dcValues, DataControlRangeDataCollection rangeData, MgControlBase control)
        {
            //add new DC values collection
            DataviewManager.DataviewSynchronizer.AddDcValues(dcValues, rangeData);

            //set dc values reference
            Task.SetDataControlValuesReference(control.getDitIdx(), dcValues.getId());

            //Update DCValRef of every record after fetching the dataControl values.
            for (int i = 0; i < ((DataView)Task.DataView).getSize(); i++)
            {
                ((DataView)Task.DataView).getRecByIdx(i).AddDcValuesReference(control.getDitIdx(), dcValues.getId());
            }

            //Update DCValRef of original record.
            ((DataView)Task.DataView).getOriginalRec().AddDcValuesReference(control.getDitIdx(), dcValues.getId());

            control.RefreshDisplay();
        }