コード例 #1
0
        public void OnShowSalesPersonView()
        {
            storeData = new storeDataSet();
            EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter storeTa = new EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter();
            storeTa.Fill(storeData.retail_store);
            View.SetRetailStoreFromDataContext(storeData.retail_store);
            View.SetRetailStoreToDataContext(storeData.retail_store);

            organizationData = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSet();
            EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter organizationTa = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter();
            organizationTa.Fill(organizationData.organization);
            View.SetOrganizationFromDataContext(organizationData.organization);
            View.SetOrganizationToDataContext(organizationData.organization);

            emplyeeData = new employeeDataSet();
            EclipsePOS.WPF.SystemManager.Data.employeeDataSetTableAdapters.employeeTableAdapter employeeTa = new EclipsePOS.WPF.SystemManager.Data.employeeDataSetTableAdapters.employeeTableAdapter();
            employeeTa.Fill(emplyeeData.employee);
            View.SetEmployeeFromDataContext(emplyeeData.employee);
            View.SetEmployeeToDataContext(emplyeeData.employee);

            View.SetRunBtnDataContext(RunCommand);
            View.SetSaveBtnDataContext(SaveCommand);
        }
コード例 #2
0
        public void OnShowEmployee()
        {
            //Employee roles
            employeeRolesData = new EclipsePOS.WPF.SystemManager.Data.employeeRolesLookupDataSet();
            EclipsePOS.WPF.SystemManager.Data.employeeRolesLookupDataSetTableAdapters.employee_rolesTableAdapter employeeRolesTa = new EclipsePOS.WPF.SystemManager.Data.employeeRolesLookupDataSetTableAdapters.employee_rolesTableAdapter();
            employeeRolesTa.Fill(employeeRolesData.employee_roles);
            View.SetEmployeeRoleDataContext(employeeRolesData.employee_roles);


            //Organization
            organizationData = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSet();
            EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter organizationTa = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter();
            organizationTa.Fill(organizationData.organization);
            View.SetOrganizationDataContext(organizationData.organization);

            //Employee
            employeeData = new EclipsePOS.WPF.SystemManager.Data.employeeDataSet();
            EclipsePOS.WPF.SystemManager.Data.employeeDataSetTableAdapters.employeeTableAdapter employeeTa = new  EclipsePOS.WPF.SystemManager.Data.employeeDataSetTableAdapters.employeeTableAdapter();
            employeeTa.Fill(employeeData.employee);
            View.SetEmployeeDataContext(employeeData.employee);

            _colView = CollectionViewSource.GetDefaultView(employeeData.employee) as CollectionView;
            taManager.employeeTableAdapter = employeeTa;



            View.SetMoveToFirstBtnDataContext(MoveToFirstCommand);
            View.SetMoveToPreviousBtnDataContext(MoveToPreviousCommand);
            View.SetMoveToNextBtnDataContext(MoveToNextCommand);
            View.SetMoveToLastBtnDataContext(MoveToLastCommand);

            View.SetDeleteBtnDataContext(DeleteCommand);
            View.SetAddBtnDataContext(AddCommand);
            View.SetRevertBtnDataContext(RevertCommand);
            View.SetSaveBtnDataContext(SaveCommand);

            // this.FilterEmployeeByOrganizationNo(PosSettings.Default.Organization);

            _colView.CurrentChanged += new EventHandler(_colView_CurrentChanged);
        }