public SaveData() { OldClientInfo = new ClientVersion.SaveData(); NewClientInfo = new ClientVersion.SaveData(); NewDocument = new Document.SaveData(); OldDocument = new Document.SaveData(); NewForeignDocument = new Document.SaveData(); OldForeignDocument = new Document.SaveData(); LivingAddress = new Address.SaveData(); RegistrationAddress = new Address.SaveData(); OldPolicy = new PolicyInfo.SaveData(); NewPolicy = new PolicyInfo.SaveData(); Representative = new Representative.SaveData(); }
private void UpdatePolicy(PolicyInfo.SaveData saveData, List <FundResponseFields> fields) { if (fields.Contains(FundResponseFields.ExpirationDate)) { saveData.EndDate = ExpirationDate ?? new DateTime(2099, 12, 31); } if (fields.Contains(FundResponseFields.OGRN)) { saveData.OGRN = OGRN; } if (fields.Contains(FundResponseFields.OKATO)) { saveData.OKATO = OKATO; } if (fields.Contains(FundResponseFields.PolicyNumber)) { saveData.Number = PolicyNumber; } if (fields.Contains(FundResponseFields.UnifierPolicyNumberToPolicyNumber)) { saveData.Number = UnifiedPolicyNumber; } if (fields.Contains(FundResponseFields.PolicySeries)) { saveData.Series = PolicySeries; } if (fields.Contains(FundResponseFields.PolicyType)) { saveData.PolicyTypeId = PolicyType.Id != 0 ? PolicyType.Id : new long?(); } if (fields.Contains(FundResponseFields.StartDate)) { saveData.StartDate = StartDate; } if (fields.Contains(FundResponseFields.UnifiedPolicyNumber)) { saveData.UnifiedPolicyNumber = UnifiedPolicyNumber; } }
private void UpdatePolicy(PolicyInfo.SaveData saveData, List <FundResponseFields> fields, EntityType type = EntityType.General) { if (fields.Contains(FundResponseFields.ExpirationDate)) { saveData.EndDate = ExpirationDate ?? new DateTime(2099, 12, 31); } if (fields.Contains(FundResponseFields.OGRN)) { saveData.OGRN = OGRN; } if (fields.Contains(FundResponseFields.OKATO)) { saveData.OKATO = Constants.MoscowOKATO; } if (fields.Contains(FundResponseFields.PolicyNumber)) { saveData.Number = PolicyNumber; } if (fields.Contains(FundResponseFields.UnifierPolicyNumberToPolicyNumber)) { saveData.Number = UnifiedPolicyNumber; } if (fields.Contains(FundResponseFields.PolicySeries)) { saveData.Series = PolicySeries; } if (fields.Contains(FundResponseFields.StartDate)) { saveData.StartDate = StartDate; } if (fields.Contains(FundResponseFields.UnifiedPolicyNumber)) { saveData.UnifiedPolicyNumber = UnifiedPolicyNumber; } if (type == EntityType.Old) { saveData.PolicyTypeId = PolicyTypeRef.OldPolicy.Id; } }