public HttpResponseMessage AssignHearingOfficer(int cID, int HearingOfficerUserID) { HttpStatusCode ReturnCode = HttpStatusCode.OK; TranInfo <bool> transaction = new TranInfo <bool>(); ReturnResult <bool> result = new ReturnResult <bool>(); try { result = _service.AssignHearingOfficer(cID, HearingOfficerUserID); if (result.status.Status == StatusEnum.Success) { transaction.data = result.result; transaction.status = true; } else { transaction.status = false; transaction.AddException(result.status.StatusMessage); } } catch (Exception ex) { transaction.AddException(ex.Message); ReturnCode = HttpStatusCode.InternalServerError; result.status = _eHandler.HandleException(ex); _commonService.LogError(result.status); } return(Request.CreateResponse <TranInfo <bool> >(ReturnCode, transaction)); }