예제 #1
0
        private void SendDataToRelevantTill()
        {
            var productGroupModel = new EventManagementSystem.Models.TillDomainObjects.ProductGroupModel
            {
                Record = ProductGroup.RecordID,
                Name   = ProductGroup.Name
            };

            string tillName  = ProductGroup.Till.Name;
            string ipAddress = ProductGroup.Till.IPAddress;

            TillsCommunicationService.SetProductGroup(productGroupModel, tillName, ipAddress);

            IsBusy = false;
            RaisePropertyChanged("CloseDialog");
        }
예제 #2
0
        private async void SendDataToAllActiveTills()
        {
            var tillProductModel = new EventManagementSystem.Models.TillDomainObjects.TillProductModel
            {
                Record            = Product.Product.PluID,
                Name              = Product.Name,
                Price1L1          = Convert.ToDecimal(Math.Round(Product.GrossPrice, 2, MidpointRounding.AwayFromZero)),
                GroupRecord       = Product.ProductGroup.Record,
                DepartmentRecord  = Product.ProductDepartment.Record,
                ProductRateRecord = Product.ProductVATRate.Record
            };

            var activeTills = await _adminDataUnit.TillsRepository.GetAllAsync(tillItem => tillItem.Enabled);

            var tillNames       = activeTills.Select(tillItem => tillItem.Name).ToList();
            var tillIPAddresses = activeTills.Select(tillItem => tillItem.IPAddress).ToList();

            TillsCommunicationService.SetTillProduct(tillProductModel, tillNames, tillIPAddresses);

            IsBusy = false;

            RaisePropertyChanged("CloseDialog");
        }