Beispiel #1
0
        /// <summary>
        /// registrar el cliente
        /// </summary>
        /// <param name="customerId"></param>
        /// <param name="linkChannelId"></param>
        /// <param name="userName"></param>
        public void register(string customerId, Guid linkChannelId, string userName)
        {
            var fromDate = DateTime.Parse("01/01/2018");

            Groups.Add(Context.ConnectionId, userName);

            var conn = connList.Find(c => c.ConnectionID == Context.ConnectionId);

            conn.CustomerId = customerId;
            conn.Name       = userName;

            conn.SubscriptionId = HubContextHelper.GetCases(customerId, linkChannelId, userName);
            //envio los casos disponibles para seleccionar
            SendCases(HubContextHelper.GetCasesMessages(customerId, fromDate, string.Empty, Guid.Parse(conn.SubscriptionId)), userName);
        }
Beispiel #2
0
        //user
        public void UserRegister(string customerId, Guid linkChannelId, string userName, string subscriptionId, string refId)
        {
            var fromDate = DateTime.Parse("01/01/2018");

            //refId como nombre de grupo
            Groups.Add(Context.ConnectionId, refId);

            var conn = connList.Find(c => c.ConnectionID == Context.ConnectionId);

            if (conn == null)
            {
                conn = new Connection(Context.ConnectionId, customerId);
            }

            conn.Name           = refId;
            conn.SubscriptionId = HubContextHelper.GetCases(customerId, linkChannelId, userName);
            conn.RefId          = refId;
            conn.SubscriptionId = subscriptionId;
        }