Пример #1
0
        /// <summary>
        /// 编辑仪器信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditClick(object sender, RoutedEventArgs e)
        {
            //获取当前数据传给修改窗口
            Equipment equ = this.equipmentDataGrid.SelectedItem as Equipment;

            EquipmentWindow equipmentWindow = new EquipmentWindow(equipmentViewModel, "Update", equ);

            equipmentWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            equipmentWindow.Show();
        }
Пример #2
0
        /// <summary>
        /// 增加仪器信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddEquInfo(object sender, RoutedEventArgs e)
        {
            //获取当前数据传给修改窗口
            //Equipment equ = this.equipmentDataGrid.SelectedItem as Equipment;
            //equ.IsChecked = true;

            EquipmentWindow equipmentWindow = new EquipmentWindow(equipmentViewModel, "add", null);

            equipmentWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            equipmentWindow.Show();
        }