public ApprovalInputDataSerializationModel(ApprovalInputData src) { DataAsOf = src.DataAsOf; MetaData = src.MetaData; MetaDataValidationErrors = new List <string>(); if ((src.MetaData != null) && (src.MetaData.ValidationErrors != null)) { MetaDataValidationErrors.AddRange(src.MetaData.ValidationErrors); } Configuration = src.Configuration; EnabledTraces = new List <string>(src.Configuration.EnabledTraces); CustomerID = src.CustomerID; SystemCalculatedAmount = src.SystemCalculatedAmount; Medal = src.Medal; MedalType = src.MedalType; TurnoverTypeStr = src.TurnoverType == null ? string.Empty : src.TurnoverType.ToString(); MarketplaceSeniority = src.MarketplaceSeniority; LatePayments = new List <Payment>(); if (src.LatePayments != null) { LatePayments.AddRange(src.LatePayments); } Turnover1Y = src.Turnover1Y; Turnover3M = src.Turnover3M; AvailableFunds = src.AvailableFunds; ReservedFunds = src.ReservedFunds; DirectorNames = new List <Tuple <string, string> >(); if (src.DirectorNames != null) { DirectorNames.AddRange(src.DirectorNames.Select( n => new Tuple <string, string>(n.FirstName, n.LastName) )); } // if HmrcBusinessNames = new List <string>(); if (src.HmrcBusinessNames != null) { HmrcBusinessNames.AddRange(src.HmrcBusinessNames.Select(n => n.RawName)); } } // constructor
} // AddLatePayment public void FullInit(ApprovalInputData aid) { Clean(); PartialInit( aid.DataAsOf, aid.Configuration, aid.m_oArguments, aid.MetaData, aid.LatePayments, aid.DirectorNames, aid.HmrcBusinessNames ); SetSeniority(aid.MarketplaceSeniority); SetAvailableFunds(aid.AvailableFunds, aid.ReservedFunds); SetTurnover(3, aid.GetTurnover(3)); SetTurnover(12, aid.GetTurnover(12)); } // FullInit
} // constructor public void FullInit(AutoDecisionFlowTypes flowType, bool errorInLGData, ApprovalInputData aid) { base.FullInit(aid); FlowType = flowType; ErrorInLGData = errorInLGData; } // FullInit