Exemplo n.º 1
0
        public IHttpActionResult GetUserNotifications(NumberOfRecord <UserIdAndUserType> model)
        {
            StringBuilder traceLog = null;
            ServiceResponse <Total <List <UserNotificationsVM> > > objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetUserFollowers() Request Data:-UserId-" + model.Param.UserId + ",UserType-" + model.Param.UserType + ",StartIndex-" + model.StartIndex + ",EndIndex-" + model.EndIndex);
                objResponse              = new ServiceResponse <Total <List <UserNotificationsVM> > >();
                objResponse.jsonData     = NotificationApiBL.GetUserNotificationList(model.StartIndex, model.EndIndex);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetUserFollowers Response Result Status-" + objResponse.IsResultTrue + ",Fetched DateTime-" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }
Exemplo n.º 2
0
        public IHttpActionResult GetTrainerUserActivity(NumberOfRecord <UserIdAndUserType> model)
        {
            StringBuilder traceLog = null;
            ServiceResponse <Total <List <RecentResultVM> > > objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetUserTrainerAssignmentList() Request Data:-UserId-" + model.Param.UserId + ",UserType-" + model.Param.UserType);
                objResponse              = new ServiceResponse <Total <List <RecentResultVM> > >();
                objResponse.jsonData     = UseresBL.GetUserActivity(model.Param.UserId, model.Param.UserType, model.StartIndex, model.EndIndex);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetUserTrainerAssignmentList() Response Result Status-" + objResponse.IsResultTrue + ",Posted DateTime-" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }
Exemplo n.º 3
0
        public IHttpActionResult GetTeamTrainers(NumberOfRecord model)
        {
            StringBuilder traceLog = null;
            ServiceResponse <Total <List <TeamTrainerVM> > > objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetAllTrainers()");
                objResponse              = new ServiceResponse <Total <List <TeamTrainerVM> > >();
                objResponse.jsonData     = TeamApiBL.GetTeamMobileCoachTrainer(model.StartIndex, model.EndIndex);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetAllTrainers() Response Result Status-" + objResponse.IsResultTrue + ",Fetched DateTime-" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }
        public IHttpActionResult GetCommentList(NumberOfRecord <ViewPostVM> model)
        {
            StringBuilder traceLog = null;
            ServiceResponse <Total <List <CommentVM> > > objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetCommentList() Request Data:-PostId-" + model.Param.PostId + ",StartIndex-" + model.StartIndex + ",EndIndex-" + model.EndIndex);
                objResponse              = new ServiceResponse <Total <List <CommentVM> > >();
                objResponse.jsonData     = PostAndCommentBL.GetCommentList(model.Param.PostId, model.StartIndex, model.EndIndex);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetCommentList() Response Result Status-" + objResponse.IsResultTrue + ",Fetched DateTime-" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }
        public IHttpActionResult GetChatHistory(NumberOfRecord <ChatHistoryRequest> chatRequest)
        {
            StringBuilder traceLog = null;
            ServiceResponse <Total <List <SocketSentChatVM> > > objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetChatHistory with" + chatRequest.Param.SenderCredId);
                objResponse              = new ServiceResponse <Total <List <SocketSentChatVM> > >();
                objResponse.jsonData     = ChatHistoryApiBL.GetChatHistory(chatRequest.Param, chatRequest.StartIndex, chatRequest.EndIndex);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetChatHistory() Response Result Status-" + objResponse.IsResultTrue + ",Fetched DateTime" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }
        public IHttpActionResult GetFilterFriendList(NumberOfRecord <FriendFilterParam> model)
        {
            StringBuilder traceLog = null;
            ServiceResponse <Total <List <FriendVM> > > objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetFilterFriendList" + model.Param + ",StartIndex-" + model.StartIndex + ",EndIndex-" + model.EndIndex);
                objResponse              = new ServiceResponse <Total <List <FriendVM> > >();
                objResponse.jsonData     = ChallengeToFriendBL.GetFilterFriendList(model);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetFilterFriendList() Response Result Status-" + objResponse.IsResultTrue + ",Fetched DateTime" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }
Exemplo n.º 7
0
        public IHttpActionResult GetVideosAndPics(NumberOfRecord <UserIdAndUserType> model)
        {
            StringBuilder traceLog = null;
            ServiceResponse <Total <List <VideoAndPicVM> > > objResponce = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetVideosAndPics() Request Data:-UserId-" + model.Param.UserId + ",UserType-" + model.Param.UserType + ",StartIndex-" + model.StartIndex + ",EndIndex-" + model.EndIndex);
                objResponce = new ServiceResponse <Total <List <VideoAndPicVM> > >();
                objResponce.IsResultTrue = true;
                objResponce.jsonData     = HomeRequestBL.GetVideosAndPics(model.Param.UserId, model.Param.UserType, model.StartIndex, model.EndIndex);
                return(Ok(objResponce));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetVideosAndPics() Response Data:- Result ststus-" + objResponce.IsResultTrue + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }
        public IHttpActionResult GetUserUseSessionList(NumberOfRecord <UserCredential> model)
        {
            StringBuilder traceLog = null;
            ServiceResponse <TotalSession <List <UsedSessionsVM> > > objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: GetUserUseSessionList() Request Data:-UserCredId-" + model.Param.UserCredId);
                objResponse              = new ServiceResponse <TotalSession <List <UsedSessionsVM> > >();
                objResponse.jsonData     = TrainingSessionApiBL.GetUsersUseSessionList(model.Param.UserCredId, model.Param.TrainingType, model.StartIndex, model.EndIndex);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:GetUserUseSessionList() Response Result Status-" + objResponse.IsResultTrue + ",Posted DateTime-" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }