コード例 #1
0
        public GetScheduleDataResponse GetSchedule(GetScheduleDataRequest request)
        {
            try
            {
                var result = new GetScheduleDataResponse();

                var repo = Factory.GetRepository(request, RepositoryType.Schedule);
                repo.UserId     = request.UserId;
                result.Schedule = (ScheduleData)repo.FindByID(request.Id);
                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
        public void GetSchedule_Test()
        {
            GetScheduleDataRequest request = new GetScheduleDataRequest
            {
                Context        = context,
                ContractNumber = contractNumber,
                UserId         = userId,
                Version        = version,
                Id             = "53ff6b92d4332314bcab46e0"
            };

            ISchedulingDataManager cm = new SchedulingDataManager {
                Factory = new SchedulingRepositoryFactory()
            };
            GetScheduleDataResponse response = cm.GetSchedule(request);

            Assert.IsNotNull(response);
        }
コード例 #3
0
        public GetScheduleDataResponse Get(GetScheduleDataRequest request)
        {
            GetScheduleDataResponse response = new GetScheduleDataResponse();

            try
            {
                if (string.IsNullOrEmpty(request.UserId))
                {
                    throw new UnauthorizedAccessException("SchedulingDD:Get()::Unauthorized Access");
                }

                response         = Manager.GetSchedule(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                FormatUtil.FormatExceptionResponse(response, base.Response, ex);

                string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0";
                Helpers.LogException(int.Parse(aseProcessID), ex);
            }
            return(response);
        }