示例#1
0
        private void SetGridMode(bool groupList)
        {
            this.isGridGrouped = groupList;

            if (this.isGridGrouped)
            {
                this.gridExCurrentList   = gridExAgreementsListGrouped;
                this.gridListGroupedRepo = new GridAgreementsListGroupedRepo();
                this.gridListGroupedRepo.BindDataSet(gridExCurrentList);
                this.gridExCurrentList.RootTable.Groups.Clear();
                this.gridExCurrentList.RootTable.Groups.Add(new GridEXGroup(this.gridExCurrentList.RootTable.Columns["IdUmowy"]));
            }
            else
            {
                this.gridExCurrentList = gridExAgreementsList;
                this.gridListRepo      = new GridAgreementsListRepo();
                this.gridListRepo.BindDataSet(gridExCurrentList);
                this.gridExCurrentList.RootTable.Groups.Clear();
            }

            gridExAgreementsList.Visible        = !this.isGridGrouped;
            gridExAgreementsListGrouped.Visible = this.isGridGrouped;
            btnRemoveAgreement.Enabled          = !this.isGridGrouped;

            btnSwitchGridMode.ImageIndex = this.isGridGrouped ? 4 : 3;

            this.ApplyPermissions();
        }
示例#2
0
        public void LoadAgreementsList()
        {
            int previouslySelectedIndex = 0;

            if (gridExCurrentList.CurrentRow != null && gridExCurrentList.CurrentRow.RowIndex > -1)
            {
                previouslySelectedIndex = gridExCurrentList.CurrentRow.RowIndex;
            }

            if (this.isGridGrouped)
            {
                this.gridListGroupedRepo = new GridAgreementsListGroupedRepo();
                this.gridListGroupedRepo.BindDataSet(gridExCurrentList);
            }
            else
            {
                this.gridListRepo = new GridAgreementsListRepo();
                this.gridListRepo.BindDataSet(gridExCurrentList);
            }

            if (previouslySelectedIndex > 0)
            {
                gridExCurrentList.MoveToRowIndex(previouslySelectedIndex);
            }
        }
示例#3
0
        public FrmProductsAndArticles()
        {
            InitializeComponent();

            this.gridProductsAndArticlesRepo   = new GridProductsAndArticlesRepo();
            this.gridAgreementsListGroupedRepo = new GridAgreementsListGroupedRepo();

            this.ApplyPermissions();
            this.LoadData();
        }
示例#4
0
        public FrmDescriptorChanges()
        {
            InitializeComponent();

            this.gridDescriptorChangesRepo     = new GridDescriptorChangesRepo();
            this.GridAgreementsListGroupedRepo = new GridAgreementsListGroupedRepo();

            this.ApplyPermissions();
            this.LoadData();
        }