/// <summary> 银行按揭信息列表获取合同进度 /// </summary> /// <returns></returns> public AdminJsonStr getcontractType() { AdminJsonStr model = new AdminJsonStr(); List <contractType> list_payway = new contractType().GetListcontracts(); model.data = list_payway; model.count = list_payway.Count; return(model); }
public Contract MapContract(contractType contract) { IEnumerable <ContractAllocation> contractAllocations = new List <ContractAllocation>(); if (contract.contractAllocations != null) { contractAllocations = contract.contractAllocations.SelectMany(FlattenContractAllocations).Select(MapContractAllocation); } return(new Contract() { ContractNumber = contract.contractNumber, ContractVersionNumber = contract.contractVersionNumber, StartDate = contract.startDateSpecified ? contract.startDate : null, EndDate = contract.endDateSpecified ? contract.endDate : null, ContractAllocations = contractAllocations.ToList() }); }
public IEnumerable <contractType> FlattenContracts(contractType contract) { return(contract.SelectRecursive(c => c.contracts)); }