Ejemplo n.º 1
0
        public GetAllActionsDataResponse Get(GetAllActionsDataRequest request)
        {
            GetAllActionsDataResponse response = new GetAllActionsDataResponse();

            try
            {
                //Get the UserId from the Header and update the request object
                //request.UserId = HttpContext.Current.Request.Headers.Get(_phytelUserIDToken);
                if (string.IsNullOrEmpty(request.UserId))
                {
                    throw new UnauthorizedAccessException("ActionDD:Get()::Unauthorized Access");
                }

                response         = ActionDataManager.GetActionsList(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);

                string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0";
                Common.Helper.LogException(int.Parse(aseProcessID), ex);
            }
            return(response);
        }
Ejemplo n.º 2
0
        public static GetAllActionsDataResponse GetActionsList(GetAllActionsDataRequest request)
        {
            GetAllActionsDataResponse result = new GetAllActionsDataResponse();

            MongoActionRepository <GetAllActionsDataResponse> repo = new MongoActionRepository <GetAllActionsDataResponse>(request.ContractNumber);

            repo.UserId = request.UserId;

            result = repo.SelectAll(request.Version, Status.Active);

            return(result);
        }