public HttpResponseMessage P0005SHPR_TICKET_LIST(TicketEntity oBe)
        {
            try
            {
                if (string.IsNullOrWhiteSpace((string)HttpContext.Current.Session["username"]))
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, "Acceso no autorizado."));
                }

                if (oBe.TIC_StatDate > oBe.TIC_EndDate)
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, "La fecha de inicio no puede mayor a la fecha final."));
                }

                var oBr   = new TicketRule();
                var oList = oBr.SHPR_TICKET_LIST(oBe);

                //if (oList.Count == 0)
                //{
                //    Request.CreateErrorResponse(HttpStatusCode.Conflict, "No se encontraron coincidencias para la búsqueda realizada.");

                //}

                return(Request.CreateResponse(HttpStatusCode.OK, oList));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }
        public HttpResponseMessage P0005SHPR_TICKET_OPEN_LIST(TicketEntity oBe)
        {
            try
            {
                if (string.IsNullOrWhiteSpace((string)HttpContext.Current.Session["username"]))
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, "Acceso no autorizado."));
                }

                var oBr   = new TicketRule();
                var oList = oBr.SHPR_TICKET_LIST(oBe);

                return(Request.CreateResponse(HttpStatusCode.OK, oList));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }