Example #1
0
        public void SortFieldByIndex(EntityConfig entity)
        {
            var business = new EntitySorter {
                Entity = entity
            };

            business.SortFieldByIndex(true);
        }
Example #2
0
        public void SortFieldByIndex()
        {
            var result = MessageBox.Show("是按序号大小排序并从0更新序号,否仅按序号大小排序", "排序", MessageBoxButton.YesNoCancel);

            if (result == MessageBoxResult.Cancel)
            {
                return;
            }
            var tables = Context.GetSelectEntities();

            foreach (var entity in tables)
            {
                var business = new EntitySorter
                {
                    Entity = entity
                };
                business.SortFieldByIndex(result == MessageBoxResult.Yes);
            }
        }