Esempio n. 1
0
        public int ws_deleteTreeItem(List <int> IDlist, out string OpStatus)
        {
            try
            {
                DeviceDataManager DDM = new DeviceDataManager();

                string s = "Удалены устройства: \n";

                foreach (int _id in IDlist)
                {
                    DDM.deleteDevice(_id);

                    s += "id = " + _id + "\n";
                }

                OpStatus = Resources.Messages.m_OpStatusDone;

                //---- Создать оповещение через сервер оповещений--------------------------------------
                NotifyServerClient.unClientClass notifyClient = new NotifyServerClient.unClientClass();
                notifyClient.sendNotify(s);
                //--------------------------------------------------------------------------------------

                return(1);
            }
            catch (Exception err)
            {
                OpStatus  = Resources.Messages.m_OpStatusFail;
                OpStatus += err.Message.ToString();
                return(0);
            }
        }
Esempio n. 2
0
        public int ws_deleteTreeItem(List<int> IDlist, out string OpStatus)
        {
            try
            {
                DeviceDataManager DDM = new DeviceDataManager();

                string s = "Удалены устройства: \n";

                foreach (int _id in IDlist)
                {
                    DDM.deleteDevice(_id);

                    s += "id = "+ _id + "\n";
                }

                OpStatus = Resources.Messages.m_OpStatusDone;

                //---- Создать оповещение через сервер оповещений--------------------------------------
                NotifyServerClient.unClientClass notifyClient = new NotifyServerClient.unClientClass();
                notifyClient.sendNotify(s);
                //--------------------------------------------------------------------------------------

                return 1;
            }
            catch (Exception err)
            {
                OpStatus = Resources.Messages.m_OpStatusFail;
                OpStatus += err.Message.ToString();
                return 0;
            }

        }