Exemple #1
0
 internal Operation(string name, OperationDisplay display, string origin, ServiceSpecification serviceSpecification)
 {
     Name    = name;
     Display = display;
     Origin  = origin;
     ServiceSpecification = serviceSpecification;
 }
 private void RemoveGlobalPriceData(ServiceSpecification servSpec)
 {
     servSpec.PriceInformation.DeductionFactor = 0m;
     servSpec.PriceInformation.FlatSum         = 0m;
     servSpec.PriceInformation.HourlyWage      = 0m;
     servSpec.PriceInformation.TaxRate         = 0m;
     servSpec.DeductionFactor = 0m;
 }
        public List <StudentDetailsModel> FetchStudentdetailsV2(StudentFilterModel filter)
        {
            _context = new StudentdataContext();
            StudentFilterModel primaryFilter = new StudentFilterModel();
            var studentDetails = _context.sp_FetchStudentDetails(primaryFilter.StudentId, primaryFilter.EnrollmentId, primaryFilter.ServiceId).AsEnumerable();
            var advancedfilter = new AdvancedFilter();

            var spec1 = new StudentSpecification(filter.StudentId);
            var spec2 = new EnrollmentSpecification(filter.EnrollmentId);
            var spec3 = new ServiceSpecification(filter.ServiceId);
            //var result= advancedfilter.Filter(studentDetails, spec1);
            //result = advancedfilter.Filter(result, spec2);
            //result = advancedfilter.Filter(result, spec3);
            var result = advancedfilter.AdvancedFilterMethod(studentDetails, new List <ISpecification <sp_FetchStudentDetails_Result> > {
                spec1, spec2, spec3
            });

            if (result != null)
            {
                var output = result.Distinct().Select(student =>
                                                      new StudentDetailsModel
                {
                    Id = student.Id
                    ,
                    DateOfBirth = student.DateOfBirth
                    ,
                    EndDate = student.Enddate
                    ,
                    Startdate = student.StartDate
                    ,
                    EnrollmentYear = student.Enrollment
                    ,
                    FullName = student.FirstName + " " + student.LastName
                    ,
                    ServiceName = student.ServiceName
                }).ToList();
                return(output);
            }
            return(new List <StudentDetailsModel>());
        }
Exemple #4
0
        public static ServiceOrder Create(ServiceSpecification specification, User user)
        {
            if (specification == null)
            {
                return(null);
            }

            var serviceOrder = new ServiceOrder
            {
                SpecificationId      = specification.Id,
                ServiceSpecification = specification,
                OrderDate            = DateTime.Now,
                StartNoEarlierThan   = DateTime.Now,
                Status = ServiceStatusType.NotReady
            };

            if (user != null)
            {
                serviceOrder.SetAuditInfo(user.Login);
            }

            return(serviceOrder);
        }
Exemple #5
0
 internal CsmOperationDescriptionProperties(ServiceSpecification serviceSpecification)
 {
     ServiceSpecification = serviceSpecification;
 }
 internal OperationProperties(ServiceSpecification serviceSpecification)
 {
     ServiceSpecification = serviceSpecification;
 }
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override IFeature DeepClone()
 {
     return(new NauticalProducts
     {
         FeatureName = FeatureName == null
             ? new[] { new FeatureName() }
             : Array.ConvertAll(FeatureName, fn => fn.DeepClone() as IFeatureName),
         FixedDateRange = FixedDateRange == null
             ? new DateRange()
             : FixedDateRange.DeepClone() as IDateRange,
         Id = Id,
         PeriodicDateRange = PeriodicDateRange == null
             ? new DateRange[0]
             : Array.ConvertAll(PeriodicDateRange, p => p.DeepClone() as IDateRange),
         SourceIndication = SourceIndication == null
             ? new SourceIndication()
             : SourceIndication.DeepClone() as ISourceIndication,
         TextContent = TextContent == null
             ? new TextContent[0]
             : Array.ConvertAll(TextContent, t => t.DeepClone() as ITextContent),
         Geometry = Geometry,
         Classification = Classification,
         Copyright = Copyright,
         MaximumDisplayScale = MaximumDisplayScale,
         HorizontalDatumReference = HorizontalDatumReference,
         HorizontalDatumValue = HorizontalDatumValue,
         VerticalDatum = VerticalDatum,
         SoundingDatum = SoundingDatum,
         ProductType = ProductType,
         MinimumDisplayScale = MinimumDisplayScale,
         IssueDate = IssueDate,
         Purpose = Purpose,
         Information = Information == null
             ? new Information[0]
             : Array.ConvertAll(Information, i => i.DeepClone() as IInformation),
         Price = Price == null
             ? new Price[0]
             : Array.ConvertAll(Price, p => p.DeepClone() as IPrice),
         ProducingAgency = ProducingAgency == null
             ? new ProducingAgency()
             : ProducingAgency.DeepClone() as IProducingAgency,
         PublicationNumber = PublicationNumber,
         DataSetName = DataSetName,
         Version = Version,
         ServiceStatus = ServiceStatus,
         Keywords = Keywords,
         ProductSpecification = ProductSpecification == null
             ? new ReferenceSpecification()
             : ProductSpecification.DeepClone() as IReferenceSpecification,
         OnlineResource = OnlineResource == null
             ? new OnlineResource()
             : OnlineResource.DeepClone() as IOnlineResource,
         ServiceSpecification = ServiceSpecification == null
             ? new ReferenceSpecification()
             : ServiceSpecification.DeepClone() as IReferenceSpecification,
         ServiceDesign = ServiceDesign == null
             ? new ReferenceSpecification()
             : ServiceDesign.DeepClone() as IReferenceSpecification,
         Links = Links == null
             ? new Link[0]
             : Array.ConvertAll(Links, l => l.DeepClone() as ILink)
     });
 }