示例#1
0
        private Domain.Store GetEntityByRowHandle(int rowHandle)
        {
            StoreView entity = null;

            if (gridViewEntities.IsDataRow(rowHandle))
            {
                entity = (StoreView)gridViewEntities.GetRow(rowHandle);
            }
            return((entity == null) ? null : entity.Entity);
        }
示例#2
0
        private StoreView GetEntityViewByRowHandle(int rowHandle)
        {
            StoreView entity = null;

            if (gridViewEntities.IsDataRow(rowHandle))
            {
                entity = (StoreView)gridViewEntities.GetRow(rowHandle);
            }
            return(entity);
        }
示例#3
0
        public void Init()
        {
            _storesViewList = new StoreViewList();
            _storesViewList.Init();
            _storesViewList.LoadAll();

            if (_storesViewList.Count > 0)
            {
                _currentView = _storesViewList[0];
            }
        }
示例#4
0
        private void SetFocusOnStoreById(long p)
        {
            StoreView view = ListOfStoresView.GetById(p);

            if (view != null)
            {
                int h = gridViewEntities.GetRowHandle(ListOfStoresView.LastSearchIndex);
                if (h != DevExpress.XtraGrid.GridControl.InvalidRowHandle)
                {
                    gridViewEntities.FocusedRowHandle = h;
                    gridViewEntities.MakeRowVisible(h, true);
                }
                else
                {
                    Context.CurrentView = FocusedEntityView;
                }
            }
        }