コード例 #1
0
        private FIN_CustomerSupplier_Info EditingCusSupInfo;                                     //Stores what we're editing right now, Incase we need to cancel the edit

        public CustomerSupplierModel(Customer CustomerSupplier)
        {
            this.CustomerSupplier = CustomerSupplier;

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

            CustomerSupplier.cmb_CusSupInfo_Flag.ItemsSource             = Helper.getItemSource(typeof(FIN_CustomerSupplier_Info), "CustSupFlag");
            CustomerSupplier.cmb_CusSupInfo_ForeignLocalFlag.ItemsSource = Helper.getItemSource(typeof(FIN_CustomerSupplier_Info), "ForeignLocalFlag");
            CustomerSupplier.cmb_CusSupInfo_Status.ItemsSource           = Helper.getItemSource(typeof(FIN_CustomerSupplier_Info), "CustSupStatus");
            CustomerSupplier.cmb_CusSupInfo_TaxFlag.ItemsSource          = Helper.getItemSource(typeof(FIN_CustomerSupplier_Info), "TaxFlag");
            CustomerSupplier.cmb_CusSupInfo_Type.ItemsSource             = Helper.getItemSource(typeof(FIN_CustomerSupplier_Info), "CustSupType");
            CustomerSupplier.cmb_CusSupInfo_PaymentMode.ItemsSource      = Helper.getItemSource(typeof(FIN_CustomerSupplier_Info), "PaymentMode");
            CustomerSupplier.cmb_CusSupInfo_CreditPeriodUnit.ItemsSource = Helper.getItemSource(typeof(FIN_CustomerSupplier_Info), "CreditPeriodUnit");



            CustomerSupplier.CusSupInfoSearchControl.ResultsGrid.SelectedCellsChanged += dgv_CustomerSupplier_SelectionChanged;
            CustomerSupplier.CusSupInfoGrid.SourceUpdated += CusSupInfoGrid_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(CustomerSupplier.CusSupInfoSearchControl.ResultsGrid, ItemSourceChanged);
            }
            Search(CustomerSupplier.CusSupInfoSearchControl);  //Initial Search to fill datagrid with values at startup
        }
コード例 #2
0
        HR_EMP_TRAININGS EditingTrainingInfomation;                  //Stores what we're editing right now, Incase we need to cancel the edit
        public TrainingModel(Training Training)
        {
            this.Training = Training;

            //The search control needs to know the method it has to use inorder to search. So we pass a method
            Training.TrainingSearchControl.Search  = Search;
            Training.EmployeeNumberDropDown.Search = EmployeeModel.Search;

            Training.cmb_TrainingStatus.ItemsSource = Helper.getItemSource(typeof(HR_EMP_TRAININGS), "TN_STATUS");

            //Training.TrainingSearchControl.ResultsGrid.AutoGeneratingColumn += dgv_Training_AutoGeneratingColumn;

            Training.TrainingSearchControl.ResultsGrid.SelectionChanged += dgv_Training_SelectionChanged;

            Training.TrainingGrid.SourceUpdated += TrainingGrid_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(Training.TrainingSearchControl.ResultsGrid, ItemSourceChanged);
            }

            Search(Training.TrainingSearchControl);  //Initial Search to fill datagrid with values at startup
        }
コード例 #3
0
        private HR_EMP_TRANSPORT EditingTransportDetailInfomation;                  //Stores what we're editing right now, Incase we need to cancel the edit

        public TransportDetailModel(TransportDetail TransportDetail)
        {
            this.TransportDetail = TransportDetail;
            //The search control needs to know the method it has to use inorder to search. So we pass a method
            TransportDetail.TransportDetailSearchControl.Search = Search;
            TransportDetail.EmployeeNumberDropDown.Search       = EmployeeModel.Search;
            TransportDetail.cmb_CommutingMode.ItemsSource       = Helper.getItemSource(typeof(HR_EMP_TRANSPORT), "ETPORT_COMMUTING_MODE");
            TransportDetail.TransportDetailSearchControl.ResultsGrid.SelectedCellsChanged += dgv_TransportDetail_SelectionChanged;
            TransportDetail.TransportDetailGrid.SourceUpdated += TransportDetailGrid_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(TransportDetail.TransportDetailSearchControl.ResultsGrid, ItemSourceChanged);
            }

            Search(TransportDetail.TransportDetailSearchControl);  //Initial Search to fill datagrid with values at startup
        }
コード例 #4
0
ファイル: HRCashBenefitModel.cs プロジェクト: vazeele/MDM
        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
        }
コード例 #5
0
        private HR_EMP_REPORTTO EditingReportingInfomation;                  //Stores what we're editing right now, Incase we need to cancel the edit

        public ReportingModel(Reporting Reporting)
        {
            this.Reporting = Reporting;

            //The search control needs to know the method it has to use inorder to search. So we pass a method
            Reporting.ReportingSearchControl.Search  = Search;
            Reporting.EmployeeNumberDropDown.Search  = EmployeeModel.Search;
            Reporting.EmployeeNumberDropDown2.Search = EmployeeModel.Search;

            Reporting.cmb_Reportingmode.ItemsSource = Helper.getItemSource(typeof(HR_EMP_REPORTTO), "EREP_REPORTING_MODE");
            Reporting.ReportingSearchControl.ResultsGrid.SelectedCellsChanged += dgv_Reporting_SelectionChanged;
            Reporting.ReportingGrid.SourceUpdated += ReportingGrid_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(Reporting.ReportingSearchControl.ResultsGrid, ItemSourceChanged);
            }

            Search(Reporting.ReportingSearchControl);  //Initial Search to fill datagrid with values at startup
        }
コード例 #6
0
        private HR_EMP_LANGUAGE EditingLastBenefitInfo;                         //Stores what we're editing right now, in case we need to cancel the edit

        public HREmpLanguageModel(HRLanguages language)
        {
            this.language = language;

            //The search control needs to know the method it has to use inorder to search. So we pass a method
            language.HREmpLanguageSearchControl.Search  = Search;
            language.EmpLanguageEmpIdDropDown.Search    = EmployeeModel.Search;
            language.EmpLanguageLangCodeDropDown.Search = HRLanguageModel.Search;

            //Fill the combobox with the values of the [Values] attribute; See entity.cs
            language.cmb_HREmpLanguage_Type.ItemsSource = Helper.getItemSource(typeof(HR_EMP_LANGUAGE), "ELANG_TYPE");
            language.HREmpLanguageSearchControl.ResultsGrid.SelectedCellsChanged += dgv_HREmpLanguage_SelectionChanged;
            language.HREmpLanguageGrid.SourceUpdated += HREmpLanguageGrid_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(language.HREmpLanguageSearchControl.ResultsGrid, ItemSourceChanged);
            }
            Search(language.HREmpLanguageSearchControl);  //Initial Search to fill datagrid with values at startup
        }
コード例 #7
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
        }
コード例 #8
0
        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.AutoGeneratingColumn += dgv_EmpNonCashBenefit_AutoGeneratingColumn;
            benefit.EmpNonCashBenefitSearchControl.ResultsGrid.SelectionChanged += 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
        }