Пример #1
0
        public void CreateTakeFeedback()
        {
            // CommonController.Log(Session["id"].ToString() + "::" + "CreateTakeFeedback-IN");
            var request = new NewFeedbackRequest
            {
                UserId        = int.Parse(Session["id"].ToString()),
                PoeId         = int.Parse(Session["SelectedPoe"].ToString()),
                FeedbackRole  = new[] { 1 },
                FeedbackType  = 1,
                IsGiveRequest = false
            };

            CreateFeedback(request);
            // CommonController.Log(Session["id"].ToString() + "::" + "CreateTakeFeedback-OUT");
        }
Пример #2
0
        //[WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        public List <CreatedFeedback> CreateFeedback(NewFeedbackRequest request)
        {
            try
            {
                FeedbackBL feedbackBl = new FeedbackBL();
                return(feedbackBl.CreateFeedback(request));
            }
            catch (Exception e)
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode        = HttpStatusCode.PreconditionFailed;
                WebOperationContext.Current.OutgoingResponse.StatusDescription = e.Message;
            }

            return(null);
        }
Пример #3
0
        public void CreateManagerFeedback(int[] userids, int[] roles)
        {
            // CommonController.Log(Session["id"].ToString() + "::" + "CreateManagerFeedback-IN");
            var request = new NewFeedbackRequest
            {
                UserId        = int.Parse(Session["id"].ToString()),
                PoeId         = int.Parse(Session["SelectedPoe"].ToString()),
                FeedbackRole  = roles,
                FeedbackType  = 2,
                IsGiveRequest = false,
                Members       = userids
            };

            CreateFeedback(request);
            // CommonController.Log(Session["id"].ToString() + "::" + "CreateManagerFeedback-OUT");
        }
Пример #4
0
 public void CreateFeedback(NewFeedbackRequest request)
 {
     // CommonController.Log(Session["id"].ToString() + "::" + "CreateFeedback-IN");
     //Session["userIds"] = null;
     if (Session["CreatedFeedbacks"] == null)
     {
         request.Subscriptionid = int.Parse(Session["subid"].ToString());
         var feedback   = new FeedbackServiceClient();
         var retunValue = feedback.CreateFeedback(request);
         Session["CreatedFeedbacks"] = retunValue;
         //CommonController.Log(Session["id"].ToString() + "::" + "CreateFeedback-OUT");
     }
     else
     {
         // CommonController.Log(Session["id"].ToString() + "::" + "CreateFeedback-SessionNULL");
     }
 }
Пример #5
0
        public void CreateRequestManagerFeedback(int[] userids, bool?email)
        {
            // CommonController.Log(Session["id"].ToString() + "::" + "CreateRequestManagerFeedback-OUT");
            var request = new NewFeedbackRequest
            {
                UserId        = int.Parse(Session["id"].ToString()),
                PoeId         = int.Parse(Session["SelectedPoe"].ToString()),
                FeedbackRole  = new[] { 1 },
                FeedbackType  = 2,
                IsGiveRequest = true,
                Members       = userids,
                EmailMode     = email != null && (bool)email
            };

            CreateFeedback(request);
            // CommonController.Log(Session["id"].ToString() + "::" + "CreateRequestManagerFeedback-OUT");
        }
Пример #6
0
        public List <CreatedFeedback> CreateFeedback(NewFeedbackRequest request)
        {
            try
            {
                FeedbackBL feedbackBl = new FeedbackBL();
                return(feedbackBl.CreateFeedback(request));
            }
            catch (Exception e)
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode        = HttpStatusCode.PreconditionFailed;
                WebOperationContext.Current.OutgoingResponse.StatusDescription = e.Message;
                BusinessLogic.Common.Common common = new BusinessLogic.Common.Common();
                common.CreateErrorLog(0, "CreateFeedback", e.Message, 0);
            }

            return(null);
        }
Пример #7
0
 /// <summary>
 /// Creates the feedback.
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 public List <CreatedFeedback> CreateFeedback(NewFeedbackRequest request)
 {
     return(DataAccess.CreateFeedback(request));
 }