コード例 #1
0
        private void InitUIList()
        {
            needAddList    = new ObservableCollection <EmployeeInfo>();
            needUpdateList = new ObservableCollection <EmployeeInfo>();
            //添加职务、部门及在职状态选择列表
            AlgorithmClass.InitEmployeeSelectionList(dataManager.AllEmployeeList, dataManager.AllPostList, dataManager.AllDepartmentList, AlgorithmClass.GetWorkStatusList());
            AllEmployeeList = AlgorithmClass.DeepClone <ObservableCollection <EmployeeInfo> >(dataManager.AllEmployeeList);
            lcv             = new ListCollectionView(AllEmployeeList);
            lcv.Filter      = Fitter_TextChanged;
            lcv.Refresh();

            SaveBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });
            RestoreBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });
            PrintBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });

            EmployeeDataGrid.ItemsSource = lcv;
        }
コード例 #2
0
 public void Init(string value, bool overriden, ParameterMetadata parameterMetadata, string objectId, bool updateEnabled, VerticalLayoutGroup layoutGroupToBeDisabled, GameObject canvasRoot)
 {
     LayoutGroupToBeDisabled = layoutGroupToBeDisabled;
     CanvasRoot = canvasRoot;
     SaveBtn.gameObject.SetActive(false);
     this.parameterMetadata = parameterMetadata;
     this.objectId          = objectId;
     SetValue(value, overriden);
     SaveBtn.SetInteractivity(updateEnabled, "Modification could only be done when offline");
     ModifyBtn.SetInteractivity(updateEnabled, "Modification could only be done when offline");
     RestoreBtn.SetInteractivity(updateEnabled, "Modification could only be done when offline");
     CancelBtn.SetInteractivity(updateEnabled, "Modification could only be done when offline");
 }
コード例 #3
0
        private void InitUIList()
        {
            appLog.Info("InitUIList...");

            needAddList    = new ObservableCollection <SalaryInfo>();
            needUpdateList = new ObservableCollection <SalaryInfo>();
            //添加雇员选择列表
            appLog.Info("Add EmployeeList...");
            AlgorithmClass.InitSalarySelectionList(dataManager.AllSalaryList, dataManager.AllEmployeeList, dataManager.AllDepartmentList, AlgorithmClass.GetWorkStatusList());
            AllSalaryList = AlgorithmClass.DeepClone <ObservableCollection <SalaryInfo> >(dataManager.AllSalaryList);
            lcv           = new ListCollectionView(AllSalaryList);
            lcv.GroupDescriptions.Add(new PropertyGroupDescription("DepartmentName"));
            lcv.Filter = Fitter_TextChanged;
            lcv.Refresh();
            //刷新当前页面上的所有收支
            // FlushCurrentViewAllCommission();
            AddBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv
            });
            ClearBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });
            SaveBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });
            RestoreBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });
            ViewBSBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });
            PrintBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });
            FlushAllBtn.SetBinding(Button.IsEnabledProperty, new Binding("IsEmpty")
            {
                Source = lcv, Converter = new BoolConverter()
            });

            SalaryDataGrid.ItemsSource = lcv;
        }