Esempio n. 1
0
        public HttpResponseMessage GetEPsByStandard(int userId, int productType, int siteId, int programId, int standardTextId, string standardEffBeginDate, int serviceProfileTypeId, int certificationItemId)
        {
            try
            {
                var EPsByStandard = TaskServices.GetEPsByStandard(userId, productType, siteId, programId, standardTextId, standardEffBeginDate, serviceProfileTypeId, certificationItemId);

                var _result = EPsByStandard.Select(m => new
                {
                    EPTextID        = m.EPTextID,
                    EPText          = m.EPText,
                    EPTextShortened = m.EPText.Length > 150 ? m.EPText.Substring(0, 150) + "..." : m.EPText,
                    SortOrder       = m.SortOrder
                });

                return(Request.CreateResponse(HttpStatusCode.OK, _result));
            }
            catch (Exception ex)
            {
                ex.Data.Add("HTTPReferrer", "JCRAPI/TaskInfo/GetEPsByStandard");
                WebExceptionHelper.LogException(ex, null);
                return(Request.CreateResponse(HttpStatusCode.OK, string.Empty));
            }
        }