private void DtuModify_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            tcServiceConfig.SelectedIndex = MainWindow.TAB_DTU_INDEX;

            if (_dtuInfoOc.Count < 1)
            {
                MessageBox.Show("无DTU.", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            int index = dgDtu.SelectedIndex;
            if (index < 0)
            {
                MessageBox.Show("无选中DTU.", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            DTUConfiguration dc = new DTUConfiguration(
                DTUConfiguration.OpenState.Modify,
                _dtuInfoOc[index].DtuId,
                _dtuInfoOc[index].SimId,
                _dtuInfoOc[index].UserName,
                _dtuInfoOc[index].UserTel);
            bool? b = dc.ShowDialog();
            if (b != true)
                return;

            PutRequest(new Tuple<string, string>(
                Consts.MAN_MODIFY_DTU,
                dc.DtuId + "\t" + dc.SimId + "\t" + dc.UserName + "\t" + dc.UserTel));
        }
        private void DtuView_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            tcServiceConfig.SelectedIndex = MainWindow.TAB_DTU_INDEX;

            if (_dtuInfoOc.Count < 1)
            {
                MessageBox.Show("无DTU.", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            int index = dgDtu.SelectedIndex;
            if (index < 0)
            {
                MessageBox.Show("无选中DTU.", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            DTUConfiguration dc = new DTUConfiguration(
                DTUConfiguration.OpenState.View,
                _dtuInfoOc[index].DtuId,
                _dtuInfoOc[index].SimId,
                _dtuInfoOc[index].UserName,
                _dtuInfoOc[index].UserTel);
            bool? b = dc.ShowDialog();
            if (b != true)
                return;
        }
        private void DtuAdd_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            tcServiceConfig.SelectedIndex = MainWindow.TAB_DTU_INDEX;

            DTUConfiguration dc = new DTUConfiguration();
            bool? b = dc.ShowDialog();
            if (b != true)
                return;

            PutRequest(new Tuple<string, string>(
                Consts.MAN_ADD_DTU,
                dc.DtuId + "\t" + dc.SimId + "\t" + dc.UserName + "\t" + dc.UserTel));
        }