예제 #1
0
        /// <summary>
        /// 新增事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtAppend_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new RuleEdit();

            dialog.Owner = this;
            dialog.Init(new RuleDto());
            dialog.ShowDialog();

            _Rules.Clear();
            LoadRule();
        }
예제 #2
0
        /// <summary>
        /// 更新事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtUpdate_Click(object sender, RoutedEventArgs e)
        {
            var dto = DgList.SelectedItem as RuleDto;

            if (dto == null)
            {
                return;
            }

            var dialog = new RuleEdit();

            dialog.Owner = this;
            dialog.Init(dto);
            dialog.ShowDialog();

            _Rules.Clear();
            LoadRule();
        }