public IHttpActionResult GetAllUserMessages(int UserId)
 {
     //try
     //{
     //    GetClientIp();
     //}
     //catch (Exception ex)
     //{
     //    log4netlogger.Error(ex);
     //}
     return(ResponseMessage(Request.CreateResponse(HttpStatusCode.OK, objProfileInfoService.GetAllUserMessages(UserId))));
 }
        public void GetUserMessages(bool isEditMode, int displayUserId, int userId)
        {
            ProfileInfoService   objProfileInfoService = new ProfileInfoService();
            List <ProfileInfoBO> userMessages          = new List <ProfileInfoBO>();

            if (isEditMode)
            {
                userMessages = objProfileInfoService.GetAllUserMessages(userId);
            }
            else
            {
                userMessages = objProfileInfoService.GetUserMessagesGroupBetween2Users(userId, displayUserId);
            }

            Clients.All.SetUserMessages(userId, userMessages);
        }