public List<LightTrucksDTO> MainLogic(List<string[]> entireExcel, List<string[]> excelS179Classification) { S179Classification s179ClassificationObj = new S179Classification(); Dictionary<string, List<S179ClassificationDTO>> allPropertyS179Classification = s179ClassificationObj.MainLogic(excelS179Classification); List<LightTrucksDTO> lightTrucksList = new List<LightTrucksDTO>(); foreach (string[] row in entireExcel) { LightTrucksDTO luxurtyAutoDTO = new LightTrucksDTO(); luxurtyAutoDTO.EffectiveDate = row[0]; luxurtyAutoDTO.ExpiryDate = row[1]; luxurtyAutoDTO.DepreciationMethod = row[3]; if (string.Equals(row[7], "P")) { luxurtyAutoDTO.IsBonus = "Yes"; } else { luxurtyAutoDTO.IsBonus = "No"; } luxurtyAutoDTO.IsQualifiedByDefault = row[5]; luxurtyAutoDTO.Zone = row[6]; luxurtyAutoDTO.LimitYear1 = row[8]; luxurtyAutoDTO.LimitYear2 = row[9]; luxurtyAutoDTO.LimitYear3 = row[10]; luxurtyAutoDTO.LimitYear4 = row[11]; luxurtyAutoDTO.ThresholdLimit = row[12]; luxurtyAutoDTO.PercentThresholdLimit = row[13]; luxurtyAutoDTO.Classifications=new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["LTV"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { luxurtyAutoDTO.Classifications.Add(s179ClassificationDTO.Classification, s179ClassificationDTO.ClassificationID); } } } lightTrucksList.Add(luxurtyAutoDTO); } lightTrucksList.RemoveAt(1); return lightTrucksList; }
public Dictionary<string, List<S179DTO>> MainLogic(List<string[]> entireExcel,List<string[]> s179Classification ) { S179Classification s179ClassificationObj = new S179Classification(); Dictionary<string, List<S179ClassificationDTO>> allPropertyS179Classification = s179ClassificationObj.MainLogic(s179Classification); foreach (string[] row in entireExcel) { if (string.Equals(row[2], "P") || string.Equals(row[2],"8")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["AUT"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListAut.Add(S179DTO); } if (string.Equals(row[3], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["BDG"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListBdg.Add(S179DTO); } if (string.Equals(row[4], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["BUS"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListBus.Add(S179DTO); } if (string.Equals(row[5], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["CEQ"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListCeq.Add(S179DTO); } if (string.Equals(row[6], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["COQ"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListCoq.Add(S179DTO); } if (string.Equals(row[7], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["CSW"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListCsw.Add(S179DTO); } if (string.Equals(row[8], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["FFE"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179Listffe.Add(S179DTO); } if (string.Equals(row[9], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["INT"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListInt.Add(S179DTO); } if (string.Equals(row[10], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["LDI"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListLdi.Add(S179DTO); } if (string.Equals(row[11], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["LHI"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListLhi.Add(S179DTO); } if (string.Equals(row[12], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["LND"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListLnd.Add(S179DTO); } if (string.Equals(row[13], "P") || string.Equals(row[13], "8")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["LTV"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification, s179ClassificationDTO.ClassificationID); } } } s179ListLtv.Add(S179DTO); } if (string.Equals(row[14], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["MFG"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListMfg.Add(S179DTO); } if (string.Equals(row[15], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["PPN"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListPpn.Add(S179DTO); } if (string.Equals(row[16], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["RPN"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListRpn.Add(S179DTO); } if (string.Equals(row[17], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["RRB"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListRrb.Add(S179DTO); } if (string.Equals(row[18], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["SUV"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListSuv.Add(S179DTO); } if (string.Equals(row[19], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["TLR"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListTlr.Add(S179DTO); } if (string.Equals(row[20], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["TRH"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListTrh.Add(S179DTO); } if (string.Equals(row[21], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["UNT"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListUnt.Add(S179DTO); } if (string.Equals(row[22], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["WRS"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListWrs.Add(S179DTO); } if (string.Equals(row[23], "P")) { S179DTO S179DTO = new S179DTO(); S179DTO.EffectiveDate = row[0]; S179DTO.ExpiryDate = row[1]; S179DTO.DepreciationMethod = row[24]; S179DTO.EstimatedLife = row[25]; S179DTO.S179Applicable = row[26]; S179DTO.IsQualifiedByDefault = row[27]; S179DTO.Zone = row[28]; S179DTO.BaseLimit = row[29]; S179DTO.ThresholdLimit = row[30]; S179DTO.PercentThresholdLimit = row[31]; S179DTO.Classifications = new Dictionary<string, string>(); List<S179ClassificationDTO> s179ClassificationDTOs = allPropertyS179Classification["CST"]; foreach (S179ClassificationDTO s179ClassificationDTO in s179ClassificationDTOs) { if (Convert.ToDateTime(s179ClassificationDTO.EffectiveDate) <= Convert.ToDateTime(row[0])) { if (string.IsNullOrEmpty(s179ClassificationDTO.ExpirationDate) || Convert.ToDateTime(s179ClassificationDTO.ExpirationDate) >= Convert.ToDateTime(row[1])) { S179DTO.Classifications.Add(s179ClassificationDTO.Classification,s179ClassificationDTO.ClassificationID); } } } s179ListCst.Add(S179DTO); } // return allPropertyS179; } allPropertyS179.Add("AUT", s179ListAut); allPropertyS179.Add("BDG", s179ListBdg); allPropertyS179.Add("BUS", s179ListBus); allPropertyS179.Add("CEQ", s179ListCeq); allPropertyS179.Add("COQ", s179ListCoq); allPropertyS179.Add("CSW", s179ListCsw); allPropertyS179.Add("FFE", s179Listffe); allPropertyS179.Add("INT", s179ListInt); allPropertyS179.Add("LDI", s179ListLdi); allPropertyS179.Add("LHI", s179ListLhi); allPropertyS179.Add("LND", s179ListLnd); allPropertyS179.Add("LTV", s179ListLtv); allPropertyS179.Add("MFG", s179ListMfg); allPropertyS179.Add("PPN", s179ListPpn); allPropertyS179.Add("RPN", s179ListRpn); allPropertyS179.Add("RRB", s179ListRrb); allPropertyS179.Add("TLR", s179ListTlr); allPropertyS179.Add("TRH", s179ListTrh); allPropertyS179.Add("UNT", s179ListUnt); allPropertyS179.Add("WRS", s179ListWrs); allPropertyS179.Add("CST", s179ListCst); allPropertyS179.Add("SUV", s179ListSuv); return allPropertyS179; }