} // GetWriteOffDate internal void Add(int nCustomerID, CustomerStatusChange csc) { if (Data.ContainsKey(nCustomerID)) { Data[nCustomerID].Add(csc); } else { Data[nCustomerID] = new List <CustomerStatusChange> { csc } }; if ((csc.NewStatus == CustomerStatus.WriteOff) && !WriteOffDate.ContainsKey(nCustomerID)) { WriteOffDate[nCustomerID] = csc.ChangeDate; } } // Add
} // GetLast public DateTime?GetWriteOffDate(int nCustomerID) { return(WriteOffDate.ContainsKey(nCustomerID) ? WriteOffDate[nCustomerID] : (DateTime?)null); } // GetWriteOffDate