public SetLoyalityCustomerSerializeAction(ICustomerRestClient customerRestClient, EntityLayer.Entities.Customer.Customer customerModel) : base("SetLoyalityCustomer") { _customerRestClient = customerRestClient; _customerModel = customerModel; }
/// <summary> /// Method to add new Customer /// </summary> private async Task SaveCustomer() { var startTime = DateTime.Now; try { var customer = new EntityLayer.Entities.Customer.Customer { LoyaltyNumber = Customer.LoyaltyNumber, Code = Customer.Code, Name = Customer.Name, PhoneNumber = Customer.PhoneNumber }; // Check whether we are setting Customer as loyalty for sale or adding a new one if (!IsAddingLoyaltyCustomer) { await _customerBussinessLogic.SetLoyaltyNumber( Customer.Code, Customer.LoyaltyNumber); MessengerInstance.Send(true, "SetCustomerAsLoyalityCustomer"); } else if (await _customerBussinessLogic.Add(customer)) { SelectCustomerForSale(customer); } } finally { var endTime = DateTime.Now; _log.Info(string.Format("Time Taken In Add Customer is {0}ms", (endTime - startTime).TotalMilliseconds)); } }
/// <summary> /// Selects Cash sale customer for the ongoing sale /// </summary> private void SelectCashCustomerForSale() { SelectedCustomer = new EntityLayer.Entities.Customer.Customer { Code = _cashSale }; SelectCustomerForSale(); }
public AddCustomerSerializeAction( ICustomerRestClient customerRestClient, ICacheManager cacheManager, EntityLayer.Entities.Customer.Customer customer) : base("AddCustomer") { _restClient = customerRestClient; _cacheManager = cacheManager; _customer = customer; }
/// <summary> /// A customer is tapped from the list of customers /// </summary> private void CustomerTapped() { if (_selectedCustomer == null) { return; } if (_previousSelectedCustomer == _selectedCustomer) { ChecksForSelectCustomerForSale(); } _previousSelectedCustomer = _selectedCustomer; }