public ActionResult UpdateSoftwareRejectionComments() { if (Request.Params["softwareRejectComments"] != null) { JObject jobj = JObject.Parse(Request.Params["softwareRejectComments"]); SoftwareRejectComments softwareRejectComments = jobj.ToObject <SoftwareRejectComments>(); UserEntity loggedInUser = (UserEntity)Session["UserObj"]; softwareRejectComments.RejectedBy = loggedInUser.FirstName + " " + loggedInUser.LastName; bool isRejectCommentsUpdated = new SoftwareService().UpdateSoftwareRejectionComments(softwareRejectComments); return(PartialView("~/Views/Authenticated/Center/UserSoftwareList.cshtml", new SoftwareViewModel() { SoftwareList = new List <SoftwareEntity>() })); } return(null); }
public bool UpdateSoftwareRejectionComments(SoftwareRejectComments softwareRejectComments) { using (_httpClient = new HttpClient()) { const string apiMethod = "UpdateSoftwareRejectionComments"; string completeURL = _webApiurl + apiMethod + '/'; StringContent httpContent = new StringContent(JsonConvert.SerializeObject(softwareRejectComments), Encoding.UTF8, "application/json"); var response = _httpClient.PostAsync(completeURL, httpContent).Result; if (response.IsSuccessStatusCode) { return(true); } else { return(false); } } }