Ejemplo n.º 1
0
        public object Get(Queue_Tickets request)
        {
            ApiUser hdUser  = request.ApiUser;
            var     tickets = WorklistTickets.GetTickets(hdUser, hdUser.OrganizationId, hdUser.DepartmentId, hdUser.UserId, "allopen", "TechTickets", request.id.ToString(), "", "", "", hdUser.IsTechAdmin, hdUser.IsUseWorkDaysTimer, request.sort_order, request.sort_by, request.search, request.page, request.limit, request.start_date, request.end_date);

            return(request.QueryResult <WorklistTicket>(tickets));
        }
Ejemplo n.º 2
0
        public object Get(Tickets_List request)
        {
            ApiUser hdUser  = request.ApiUser;
            int     user_id = hdUser.UserId;

            if (request.user > 0)
            {
                if (hdUser.IsTechAdmin || Array.IndexOf(hdUser.Roles, "super") > -1)
                {
                    user_id = request.user;
                }
            }
            if (Array.IndexOf(hdUser.Roles, "super") > -1 && request.user > 0)
            {
                request.account = hdUser.AccountName;
            }
            //v3
            if (!string.IsNullOrEmpty(request.query))
            {
                request.role  = request.query;
                request.query = "";
            }
            if (!string.IsNullOrEmpty(request.role) && request.role.ToLower() == "user_tech")
            {
                return(request.QueryResult <TicketSearchResult>(Models.TicketSearchResults.GetTickets(hdUser.OrganizationId, hdUser.DepartmentId, request.account, request.project)));
            }
            if ("undefined" == request.location)
            {
                request.location = "";
            }
            var tickets = WorklistTickets.GetTickets(hdUser, hdUser.OrganizationId, hdUser.DepartmentId, user_id, request.status, request.role, request.Class, request.account, request.location, request.project, hdUser.IsTechAdmin, hdUser.IsUseWorkDaysTimer, request.sort_order, request.sort_by, request.search, request.page, request.limit, request.start_date, request.end_date);

            return(request.QueryResult <WorklistTicket>(tickets));
        }
Ejemplo n.º 3
0
        public object Get(Tickets_List request)
        {
            ApiUser hdUser  = request.ApiUser;
            var     tickets = WorklistTickets.GetTickets(hdUser.OrganizationId, hdUser.DepartmentId, hdUser.UserId, request.query, request.status, request.role, hdUser.IsTechAdmin, hdUser.IsUseWorkDaysTimer, request.page, request.limit);

            return(tickets);
        }
Ejemplo n.º 4
0
        public object Get(Queue_Tickets request)
        {
            ApiUser hdUser = request.ApiUser;

            return(WorklistTickets.GetTickets(hdUser.OrganizationId, hdUser.DepartmentId, hdUser.UserId, "allopen", request.id.ToString(), "TechTickets", hdUser.IsTechAdmin, hdUser.IsUseWorkDaysTimer, request.page, request.limit));
        }