示例#1
0
        public EWS.Domain.Data.DataModel.ContractInclusion[] GetContractInclusions(int QuoteID)
        {
            QuoteQuery quotequery = new QuoteQuery()
            {
                ID = QuoteID
            };

            EWS.Domain.Data.DataModel.Quote quote = _queryProcessor.Execute(quotequery);

            DeviceQuery devicequery = new DeviceQuery()
            {
                DeviceID = quote.DeviceID
            };

            EWS.Domain.Model.Device device = _queryProcessor.Execute(devicequery);

            ContractInclusionsQuery inclquery = new ContractInclusionsQuery()
            {
                ModalityID = device.ModalityID
            };
            IEnumerable <EWS.Domain.Data.DataModel.ContractInclusion> result1 = _queryProcessor.Execute(inclquery);

            inclquery = new ContractInclusionsQuery()
            {
                ModalityID = null
            };
            IEnumerable <EWS.Domain.Data.DataModel.ContractInclusion> result2 = _queryProcessor.Execute(inclquery);


            EWS.Domain.Data.DataModel.ContractInclusion[] inclusions = result1.Concat(result2).ToArray();


            return(inclusions);
        }
示例#2
0
        public Device[] GetCoveredItems(int QuoteID)
        {
            QuoteQuery quotequery = new QuoteQuery()
            {
                ID = QuoteID
            };

            EWS.Domain.Data.DataModel.Quote quote = _queryProcessor.Execute(quotequery);

            DeviceQuery devicequery = new DeviceQuery()
            {
                DeviceID = quote.DeviceID
            };

            EWS.Domain.Model.Device device = _queryProcessor.Execute(devicequery);

            return(new Device[1] {
                device
            });                                 //Todo finish this so it returns the individual components
        }