예제 #1
0
        public ObservableCollection<Location> GetBySiteIDComboBox(int siteID)
        {
            var locations = new UnitOfWork().LocationRepository.Get(o => o.SiteID == siteID);

            _list = new ObservableCollection<Location>(locations);

            Location all = new Location();
            all.LocationName = "All Loactions";
            all.row_id = -1;
            _list.Insert(0, all);

            return _list;
        }
예제 #2
0
        private void LoadCustomerRadioButtonList()
        {
            List<CustomRadioButton> list = new List<CustomRadioButton>();

            var customers = new UnitOfWork().CustomerRepository.Get();

            foreach (var customer in customers)
            {
                if (customer.row_id == _selectedCustomer.row_id)
                {
                    list.Add(new CustomRadioButton(customer.row_id, customer.BusinessName, true));
                }
                else
                {
                    list.Add(new CustomRadioButton(customer.row_id, customer.BusinessName));
                }
            }

            RadioButtonList = list;
        }
예제 #3
0
        private void OnSave(object obj)
        {
            var unitOfWork = new UnitOfWork();
            unitOfWork.SiteRepository.Update(_site);
            unitOfWork.Save();

            OnClose(null);
        }
예제 #4
0
        private void OnSave(object obj)
        {
            var unitOfWork = new UnitOfWork();
            unitOfWork.CustomerRepository.Update(_customer);
            unitOfWork.Save();

            OnClose(null);
        }
        // by Fred, 2-5-2013
        #region Command Method

        // command function, called by the xxxCommand.Execute.cs
        private void OnSave(object o)
        {
            var unitOfWork = new UnitOfWork();

            unitOfWork.EquipmentRepository.Update(o as Equipment);
            unitOfWork.Save();

            BackToSiteTabEquipment();
        }