/// <summary>
        /// Setting Configuration to new file.
        /// </summary>
        public void Commit()
        {
            Console.WriteLine("Pozvan je Commit na SCADA");
            IDistributedTransactionCallback callback = OperationContext.Current.GetCallbackChannel <IDistributedTransactionCallback>();

            ScadaModelParser parser = new ScadaModelParser();

            // to do check this
            //parser.SwapConfigs(currentConfigFile, modifiedConfigFile);

            callback.CallbackCommit("Commited on SCADA");
        }
        public void Commit()
        {
            Console.WriteLine("Pozvan je Commit na NMS-u");

            if (GenericDataAccess.NewNetworkModel != null)
            {
                GenericDataAccess.NetworkModel = GenericDataAccess.NewNetworkModel;
                ResourceIterator.NetworkModel  = GenericDataAccess.NewNetworkModel;
            }

            IDistributedTransactionCallback callback = OperationContext.Current.GetCallbackChannel <IDistributedTransactionCallback>();

            callback.CallbackCommit("Uspjesno je prosao commit na NMS-u");
        }
Пример #3
0
        public void Commit()
        {
            Console.WriteLine("Pozvan je Commit na DMS-u");
            DMSServiceHost.Instance.Tree = newTree;
            if (DMSServiceHost.updatesCount >= 2)
            {
                Publisher            publisher = new Publisher();
                List <UIUpdateModel> update    = new List <UIUpdateModel>();
                Source s = (Source)DMSServiceHost.Instance.Tree.Data[DMSServiceHost.Instance.Tree.Roots[0]];
                update.Add(new UIUpdateModel(true, s.ElementGID));

                //publisher.PublishUpdateDigital(update);
            }


            IDistributedTransactionCallback callback = OperationContext.Current.GetCallbackChannel <IDistributedTransactionCallback>();

            callback.CallbackCommit("Uspjesno je prosao commit na DMS-u");
        }