예제 #1
0
        private HR_CASH_BENEFIT EditingLastBenefitInfo;                        //Stores what we're editing right now, Incase we need to cancel the edit

        public HRCashBenefitModel(HRBenefits benefit)
        {
            this.benefit = benefit;

            //The search control needs to know the method it has to use inorder to search. So we pass a method
            benefit.CashBenefitSearchControl.Search = Search;

            //Fill the combobox with the values of the [Values] attribute; See entity.cs
            benefit.cmb_CashBenifits_ActiveInactiveFlag.ItemsSource            = Helper.getItemSource(typeof(HR_CASH_BENEFIT), "STATUS_FLAG");
            benefit.CashBenefitSearchControl.ResultsGrid.SelectedCellsChanged += dgv_AccountType_SelectionChanged;
            benefit.CashBenefitGrid.SourceUpdated += CashBenefitGrid_SourceUpdated;
            //This is a event which fires whenever newitems arrive at the datagrid
            var dpd = DependencyPropertyDescriptor.FromProperty(ItemsControl.ItemsSourceProperty, typeof(DataGrid));

            if (dpd != null)
            {
                dpd.AddValueChanged(benefit.CashBenefitSearchControl.ResultsGrid, ItemSourceChanged);
            }
            Search(benefit.CashBenefitSearchControl);  //Initial Search to fill datagrid with values at startup
        }
예제 #2
0
        private HR_EMP_CASH_BENEFIT EditingLastBenefitInfo;                        //Stores what we're editing right now, in case we need to cancel the edit

        public HREmpCashBenefitModel(HRBenefits benefit)
        {
            this.benefit = benefit;

            //The search control needs to know the method it has to use inorder to search. So we pass a method
            benefit.EmpCashBenefitSearchControl.Search = Search;

            benefit.EmpCashBenifitEmpIdDropDown.Search    = EmployeeModel.Search;
            benefit.EmpCashBenifitsBenCodeDropDown.Search = HRCashBenefitModel.Search;
            benefit.EmpCashBenefitSearchControl.ResultsGrid.SelectedCellsChanged += dgv_EmpCashbenefit_SelectionChanged;
            benefit.EmpCashBenefitGrid.SourceUpdated += EmpCashBenefitGrid_SourceUpdated;
            //This is a event which fires whenever newitems arrive at the datagrid
            var dpd = DependencyPropertyDescriptor.FromProperty(ItemsControl.ItemsSourceProperty, typeof(DataGrid));

            if (dpd != null)
            {
                dpd.AddValueChanged(benefit.EmpCashBenefitSearchControl.ResultsGrid, ItemSourceChanged);
            }
            Search(benefit.EmpCashBenefitSearchControl);  //Initial Search to fill datagrid with values at startup
        }
예제 #3
0
        HR_NONCASH_BENEFIT EditingLastBenefitInfo;                        //Stores what we're editing right now, In case we need to cancel the edit
        public HRNonCashBenefitModel(HRBenefits benefit)
        {
            this.benefit = benefit;

            //The search control needs to know the method it has to use inorder to search. So we pass a method
            benefit.NonCashBenefitSearchControl.Search = Search;

            //Fill the combobox with the values of the [Values] attribute; See entity.cs
            benefit.cmb_NonCashBenifits_ItemReturnableFlag.ItemsSource = Helper.getItemSource(typeof(HR_NONCASH_BENEFIT), "NBEN_ITEM_RETURNABLE_FLG");
            benefit.cmb_NonCashBenifits_StatusFlag.ItemsSource         = Helper.getItemSource(typeof(HR_NONCASH_BENEFIT), "STATUS_FLAG");
            // benefit.NonCashBenefitSearchControl.ResultsGrid.AutoGeneratingColumn += dgv_NonCashBenefit_AutoGeneratingColumn;
            benefit.NonCashBenefitSearchControl.ResultsGrid.SelectionChanged += dgv_NonCashBenefit_SelectionChanged;
            benefit.NonCashBenefitGrid.SourceUpdated += NonCashBenefitGrid_SourceUpdated;
            //This is a event which fires whenever newitems arrive at the datagrid
            var dpd = DependencyPropertyDescriptor.FromProperty(ItemsControl.ItemsSourceProperty, typeof(DataGrid));

            if (dpd != null)
            {
                dpd.AddValueChanged(benefit.NonCashBenefitSearchControl.ResultsGrid, ItemSourceChanged);
            }
            Search(benefit.NonCashBenefitSearchControl);  //Initial Search to fill datagrid with values at startup
        }
예제 #4
0
        private HR_EMP_NONCASH_BENEFIT EditingLastBenefitInfo;                        //Stores what we're editing right now, in case we need to cancel the edit

        public HREmpNonCashBenefitModel(HRBenefits benefit)
        {
            this.benefit = benefit;

            //The search control needs to know the method it has to use inorder to search. So we pass a method
            benefit.EmpNonCashBenefitSearchControl.Search    = Search;
            benefit.EmpNonCashBenifitEmpIdDropDown.Search    = EmployeeModel.Search;
            benefit.EmpNonCashBenifitsBenCodeDropDown.Search = HRNonCashBenefitModel.Search;

            //Fill the combobox with the values of the [Values] attribute; See entity.cs
            benefit.cmb_EmpNonCashBenifits_AssessManagementFlag.ItemsSource          = Helper.getItemSource(typeof(HR_EMP_NONCASH_BENEFIT), "ENBEN_ASSES_MGMT_FLG");
            benefit.EmpNonCashBenefitSearchControl.ResultsGrid.SelectedCellsChanged += dgv_EmpNonCashbenefit_SelectionChanged;
            benefit.EmpNonCashBenefitGrid.SourceUpdated += EmpNonCashBenefitGrid_SourceUpdated;
            //This is a event which fires whenever newitems arrive at the datagrid
            var dpd = DependencyPropertyDescriptor.FromProperty(ItemsControl.ItemsSourceProperty, typeof(DataGrid));

            if (dpd != null)
            {
                dpd.AddValueChanged(benefit.EmpNonCashBenefitSearchControl.ResultsGrid, ItemSourceChanged);
            }
            Search(benefit.EmpNonCashBenefitSearchControl);  //Initial Search to fill datagrid with values at startup
        }