/// <summary> /// Adds a new customer to the current cart. /// </summary> /// <param name="userid">The GUID UserId of the customer.</param> /// <param name="username">The username of the customer.</param> /// <param name="firstname">The customer's first name.</param> /// <param name="lastname">The customer's last name.</param> /// <param name="customeraddress">The customer's address.</param> /// <param name="city">The customer's city.</param> /// <param name="province">The customer's province.</param> /// <param name="postalcode">The customer's postal code.</param> /// <param name="phonenumber">The customer's phone number.</param> /// <param name="name">The name of the company the customer works for, if appropriate.</param> /// <param name="approved">Whether the customer is approved for ordering or not.</param> /// <param name="lastactivitydate">The last time the customer interacted with the system.</param> /// <returns>The current cart.</returns> public static List<CustomerControlCookie> AddItem(Guid userid, string username, string firstname, string lastname, string customeraddress, string city, string province, string postalcode, string phonenumber, string name, bool approved, DateTime lastactivitydate) { List<CustomerControlCookie> cart = RetrieveCart(); CustomerControlCookie customer = new CustomerControlCookie(); customer.UserId = userid; customer.FirstName = firstname; customer.LastName = lastname; customer.UserName = username; customer.CustomerAddress = customeraddress; customer.City = city; customer.Province = province; customer.PostalCode = postalcode; customer.PhoneNumber = phonenumber; customer.Name = name; customer.Approved = approved; customer.LastActivityDate = lastactivitydate; cart.Add(customer); return cart; }
public static List<CustomerControlCookie> AddItem(CustomerControlCookie item) { List<CustomerControlCookie> cart = RetrieveCart(); cart.Add(item); return cart; }