Exemplo n.º 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();
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
        public FrmProductsAndArticles()
        {
            InitializeComponent();

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

            this.ApplyPermissions();
            this.LoadData();
        }
Exemplo n.º 4
0
        public FrmDescriptorChanges()
        {
            InitializeComponent();

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

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