Пример #1
0
        public YarnPriceViewModel(StackPanel stackPanel)
        {
            _stackPanel = stackPanel;
            var factoryList = FactoryModule.GetFactoryList().Where(w => w.Process == DataClass.Enumeration.ProcessItem.Yarn);

            FactoryList = new ObservableCollection <Factory>(factoryList);

            IEnumerable <YarnSpecification> yarnSpecificationList = FabricModule.GetYarnSpecificationList();

            YarnSpecificationList = new ObservableCollection <YarnSpecification>(yarnSpecificationList);
        }
Пример #2
0
        private void AddYarnSpecificationExecute()
        {
            bool success = FabricModule.AddYarnSpecification(YarnSpecification);

            if (success)
            {
                MessageBox.Show("新增成功!!");
                IEnumerable <YarnSpecification> yarnSpecificationList = FabricModule.GetYarnSpecificationList();
                YarnSpecificationList = new ObservableCollection <YarnSpecification>(yarnSpecificationList);
                RaisePropertyChanged("YarnSpecificationList");
            }
            else
            {
                MessageBox.Show("新增失敗!!");
            }
        }