/// <summary> /// Update Customer details (Balance) in database based on Payment done /// </summary> /// <param name="shopSettingDetails">Customer object to be Updated</param> /// <returns>returns boolean value indicating if the records are Updated in database</returns> bool ICustomerService.UpdateCustomerDetail(CustomerDTO customerDetail) { customer customerEntity = new customer(); ObjectMapper.Map(customerDetail, customerEntity); return CustomerRepository.Update(customerEntity); }
/// Save Customer details in database /// </summary> /// <param name="shopSettingDetails">Customer object to be saved</param> /// <returns>returns integer value as identity value for the new customer record entered in database</returns> /// <summary> int ICustomerService.SaveCustomerDetail(CustomerDTO customerDetails) { customer customerEntity = new customer(); ObjectMapper.Map(customerDetails, customerEntity); CustomerRepository.Save(customerEntity); return customerEntity.id; }
private void Fixupcustomer(customer previousValue) { if (previousValue != null && previousValue.email_history.Contains(this)) { previousValue.email_history.Remove(this); } if (customer != null) { if (!customer.email_history.Contains(this)) { customer.email_history.Add(this); } if (customer_id != customer.id) { customer_id = customer.id; } } else if (!_settingFK) { customer_id = null; } }
private void Fixupcustomer(customer previousValue) { if (previousValue != null && previousValue.accounts.Contains(this)) { previousValue.accounts.Remove(this); } if (customer != null) { if (!customer.accounts.Contains(this)) { customer.accounts.Add(this); } if (customer_id != customer.id) { customer_id = customer.id; } } }