public bool AddToList(C5Emails newItem) { int startingCount = customers.Count; customers.Add(newItem); bool wasAdded = (customers.Count > startingCount) ? true : false; return(wasAdded); }
public bool UpdateExistingCustomer(string originalID, C5Emails newCustomer) { C5Emails oldcustomer = GetCustomerByID(originalID); if (oldcustomer != null) { oldcustomer.ID = newCustomer.ID; oldcustomer.FirstName = newCustomer.FirstName; oldcustomer.LastName = newCustomer.LastName; oldcustomer.CustomerType = newCustomer.CustomerType; return(true); } else { return(false); } }
public bool DeleteExisting(C5Emails existingCustomer) { bool deleteResult = customers.Remove(existingCustomer); return(deleteResult); }