public SurveyRequestController() { _context = new ErpEntities(Constants.ConnectionString); _SurveyRequest = new SurveyRequest(_context); _documentNoSetting = new DocumentNoSetting(_context); _lookup = new Lookups(_context); _shipmentType = new BaseModel <iffsShipmentType>(_context); _userOperationMapping = new BaseModel <iffsUserOperationTypeMapping>(_context); _ReceivingClient = new ReceivingClient(_context); _notification = new BaseModel <iffsNotification>(_context); }
public void DistributeMessage(String Message) { foreach (TcpClient ReceivingClient in Clients.Keys) { if (!Terminated) { try { NetworkStream ReceivingStream = ReceivingClient.GetStream(); UTF8Encoding encoder = new UTF8Encoding(); byte[] buffer = encoder.GetBytes(BeeperBuilder.BuildMessageJSON(new Message(BeeperBuilder.CleanseUserForDistribution(ServerUser), "MESSAGE_STANDARD", Message, DateTime.Now))); ReceivingStream.Write(buffer, 0, buffer.Length); ReceivingStream.Flush(); } catch { } } } }
public void DistributeMessage(Message Message) { foreach (TcpClient ReceivingClient in Clients.Keys) { if (!Terminated) { try { NetworkStream ReceivingStream = ReceivingClient.GetStream(); UTF8Encoding encoder = new UTF8Encoding(); byte[] buffer = encoder.GetBytes(BeeperBuilder.BuildMessageJSON(Message)); ReceivingStream.Write(buffer, 0, buffer.Length); ReceivingStream.Flush(); } catch { } } } }