/// <summary>
 /// Saves the current customer
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello Context.
 /// </param>
 /// <param name="customer">
 /// The customer.
 /// </param>
 /// <param name="raiseEvents">
 /// The raise Events.
 /// </param>
 protected static void SaveCustomer(IMerchelloContext merchelloContext, ICustomerBase customer, bool raiseEvents = true)
 {
     if (typeof(AnonymousCustomer) == customer.GetType())
     {
         merchelloContext.Services.CustomerService.Save(customer as AnonymousCustomer, raiseEvents);
     }
     else
     {
         ((CustomerService)merchelloContext.Services.CustomerService).Save(customer as Customer, raiseEvents);
     }
 }
 /// <summary>
 /// Saves the current customer
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello Context.
 /// </param>
 /// <param name="customer">
 /// The customer.
 /// </param>
 private static void SaveCustomer(IMerchelloContext merchelloContext, ICustomerBase customer)
 {
     if (typeof(AnonymousCustomer) == customer.GetType())
     {
         merchelloContext.Services.CustomerService.Save(customer as AnonymousCustomer);
     }
     else
     {
         ((CustomerService)merchelloContext.Services.CustomerService).Save(customer as Customer);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Saves the current customer
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello Context.
 /// </param>
 /// <param name="customer">
 /// The customer.
 /// </param>
 private static void SaveCustomer(IMerchelloContext merchelloContext, ICustomerBase customer)
 {
     if (typeof(AnonymousCustomer) == customer.GetType())
     {
         merchelloContext.Services.CustomerService.Save(customer as AnonymousCustomer);
     }
     else
     {
         ((CustomerService)merchelloContext.Services.CustomerService).Save(customer as Customer);
     }
 }