Beispiel #1
0
        public AddMenuEntityCommand()
        {
            ExcuteHandler = () =>
            {
                string parentId = GetArgument();

                using (MenuEditView view = new MenuEditView(parentId))
                {
                    view.ShowDialog();
                }
            };
        }
Beispiel #2
0
        public EditMenuEntityCommand()
        {
            ExcuteHandler = () =>
            {
                MenuEntity entity = GetArgument();

                if (entity == null)
                {
                    return;
                }

                if (entity.Sys)
                {
                    //TODO:系统项不允许编辑
                }

                using (MenuEditView view = new MenuEditView(entity.ParentId))
                {
                    view.MainMenuEntity = entity;
                    view.ShowDialog();
                }
            };
        }