public COrder(string orderid, CStore storeLocation, CCustomer customer, DateTime orderedTime)
 {
     Orderid       = orderid;
     StoreLocation = storeLocation;
     Customer      = customer;
     OrderedTime   = orderedTime;
 }
Exemple #2
0
 public COrder(string orderid, CStore storeLocation, CCustomer customer, double totalCost)
 {
     Orderid       = orderid;
     StoreLocation = storeLocation;
     Customer      = customer;
     TotalCost     = totalCost;
 }
 /// <summary>
 /// parameterized constructor
 /// </summary>
 public COrder(CStore storeLocation, CCustomer customer, DateTime orderedTime, double totalCost, List <CProduct> productList)
 {
     StoreLocation = storeLocation;
     Customer      = customer;
     OrderedTime   = orderedTime;
     TotalCost     = totalCost;
     ProductList   = productList;
 }
 public COrder(string orderid, CStore storeLocation, CCustomer customer, DateTime orderedTime, double totalCost)
 {
     Orderid       = orderid;
     StoreLocation = storeLocation;
     Customer      = customer;
     OrderedTime   = orderedTime;
     TotalCost     = totalCost;
 }
        static public CustomerViewModel MapSingleCustomerWithCredential(CCustomer customer, CCredential credential)
        {
            var viewCustomer = new CustomerViewModel
            {
                Customerid  = customer.Customerid,
                Firstname   = customer.FirstName,
                Lastname    = customer.LastName,
                Phonenumber = customer.PhoneNumber,
                Email       = customer.Email,
                Password    = credential.Password,
            };

            return(viewCustomer);
        }
Exemple #6
0
        /// <summary>
        /// store's behavior to add a customer
        /// add a customer if he is currently not a member
        /// </summary>
        public void AddCustomer(CCustomer customer)
        {
            // create new profile
            string customerid = customer.Customerid;

            CCustomer tempo;

            if (CustomerDict.TryGetValue(customerid, out tempo))
            {
                // already exist, no need to add
            }
            else
            {
                // not found, create a new customer profile
                CustomerDict[customerid] = customer;
            }
        }