Пример #1
0
        private RequestParameter getCreateOrUpdateRequest(long id)
        {
            BaseRequest request = requestRepository.Get(id);

            if (request == null)
            {
                request = requestArchRepository.Get(id);
            }

            if (request == null)
            {
                throw new DataServiceException(Resource.NoDataFoundMsg);
            }


            return(new RequestParameter()
            {
                Id = request.Id,
                ObjectId = request.Object.Id,
                ObjectName = RequestObjectDTO.GetObjectName(request.Object.ObjectType.Name,
                                                            request.Object.SoftName,
                                                            request.Object.HardType,
                                                            request.Object.Model),
                TempRequestKey = Guid.NewGuid(),
                DescriptionProblem = request.DescriptionProblem,
                EmployeeId = request.Employee.Id,
                EmployeeInfo = EmployeeDTO.GetEmployeeInfo(request.Employee.FM, request.Employee.IM, request.Employee.OT, request.Employee.Phone,
                                                           request.Employee.Organization.Name, request.Employee.Organization.Address),
                Version = request.Version
            });
        }
Пример #2
0
        /// <summary>
        /// Параметры для создания новой заявки на основе существующего объекта (ПО/ТО)
        /// </summary>
        public RequestParameter GetNewByObjectId(long objectId)
        {
            RequestObject edsObject = objectRepository.Get(objectId);

            return(new RequestParameter()
            {
                ObjectId = objectId,
                ObjectName = RequestObjectDTO.GetObjectName(edsObject.ObjectType.Name,
                                                            edsObject.SoftName,
                                                            edsObject.HardType,
                                                            edsObject.Model),
                TempRequestKey = Guid.NewGuid()
            });
        }