Exemplo n.º 1
0
        String GetStatus()
        {
            Enumerations.ChatRoomStatus s = (Enumerations.ChatRoomStatus)Enum.Parse(typeof(Enumerations.ChatRoomStatus), this.Status.ToString());
            switch (s)
            {
            case Enumerations.ChatRoomStatus.Waiting:
            {
                return("En espera de atención");
            }

            case Enumerations.ChatRoomStatus.Active:
            {
                return("Activo");
            }

            case Enumerations.ChatRoomStatus.ClosedByOwner:
            {
                return("Cerrado por cliente");
            }

            case Enumerations.ChatRoomStatus.ExpiredTimeout:
            {
                return("Expiro");
            }
            }
            return(String.Empty);
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="chatRoomId"></param>
        /// <param name="recordId"></param>
        /// <param name="chatRoomStatus"></param>
        /// <returns></returns>
        internal static List <Message> RecieveComments(int chatRoomId, int recordId, out Enumerations.ChatRoomStatus chatRoomStatus, out Boolean operatorWriting, out string pNameOperator)
        {
            chatRoomStatus = Enumerations.ChatRoomStatus.Active;
            int?chatRoomStatusFromEtl = null;

            operatorWriting = false;
            List <Message> result = EpironChatDAC.RecieveComments(recordId, out chatRoomStatusFromEtl, out operatorWriting, out pNameOperator);

            if (chatRoomStatusFromEtl.HasValue)
            {
                if (Common.Common.ClosedStatus.Any(p => p.Equals(chatRoomStatusFromEtl.Value)))
                {
                    ChatRoomDAC.Update(chatRoomId, recordId, (int)WebChat.Common.Enumerations.ChatRoomStatus.ClosedByOperator);
                    chatRoomStatus = WebChat.Common.Enumerations.ChatRoomStatus.ClosedByOperator;
                }
            }

            return(result);
        }