Пример #1
0
        public bool AddToList(C5Emails newItem)
        {
            int startingCount = customers.Count;

            customers.Add(newItem);
            bool wasAdded = (customers.Count > startingCount) ? true : false;

            return(wasAdded);
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
        public bool DeleteExisting(C5Emails existingCustomer)
        {
            bool deleteResult = customers.Remove(existingCustomer);

            return(deleteResult);
        }