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); } }
static void Main(string[] args) { //NotifyServer.NotifyServerCore server = new NotifyServer.NotifyServerCore(); //server.Start(); NotifyServerClient.unClientClass notifyClient = new NotifyServerClient.unClientClass(); notifyClient.sendNotify("Добавлен один новый паспорт в базу устройств"); Console.WriteLine("Для завершения нажмите Enter..."); Console.ReadKey(); }
static void Main(string[] args) { //NotifyServer.NotifyServerCore server = new NotifyServer.NotifyServerCore(); //server.Start(); NotifyServerClient.unClientClass notifyClient = new NotifyServerClient.unClientClass(); notifyClient.sendNotify("Добавлен один новый паспорт в базу устройств"); Console.WriteLine("Для завершения нажмите Enter..."); Console.ReadKey(); }
public int ws_insertPassport(wsPassportExtended p, int ID, out string OpStatus) { try { int code = 0; DeviceDataManager DDM = new DeviceDataManager(); code = DDM.insertPassport(p, ID); if (code == 0) { OpStatus = Resources.Messages.m_OpStatusDone; } else { OpStatus = Resources.Messages.m_OpStatusFail; OpStatus += code; } //---- Создать оповещение через сервер оповещений-------------------------------------- string s = "Добавлен новый паспорт в базу устройств \n"; s += "Наименование: " + p.DevDescrRU + "\n"; s += "инв.№ = " + p.DevInvNo + "\n"; s += "№ паспорта = " + p.DevPassportNo + "\n"; 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); } }
public int ws_insertPassport(wsPassportExtended p, int ID, out string OpStatus) { try { int code = 0; DeviceDataManager DDM = new DeviceDataManager(); code = DDM.insertPassport(p,ID); if (code == 0) { OpStatus = Resources.Messages.m_OpStatusDone; } else { OpStatus = Resources.Messages.m_OpStatusFail; OpStatus += code; } //---- Создать оповещение через сервер оповещений-------------------------------------- string s = "Добавлен новый паспорт в базу устройств \n"; s += "Наименование: " + p.DevDescrRU + "\n"; s += "инв.№ = " + p.DevInvNo + "\n"; s += "№ паспорта = " + p.DevPassportNo + "\n"; 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; } }
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; } }