コード例 #1
0
        private void EditItemBtn_Click(object sender, RoutedEventArgs e)
        {
            var temp = this.AllAssayItemList.SelectedItem as CommContracts.AssayItem;

            if (temp == null)
            {
                return;
            }

            // 新增化验项目
            var window = new Window();

            EditAssayItemView eidtAssayItem = new EditAssayItemView(temp);

            window.Content = eidtAssayItem;
            window.Width   = 400;
            window.Height  = 500;
            //window.ResizeMode = ResizeMode.NoResize;
            bool?bResult = window.ShowDialog();

            if (bResult.Value)
            {
                MessageBox.Show("化验项目修改完成!");
                UpdateAllDate();
            }
        }
コード例 #2
0
        private void NewItemBtn_Click(object sender, RoutedEventArgs e)
        {
            // 新增化验项目
            var window = new Window();

            EditAssayItemView eidtAssayItem = new EditAssayItemView();

            window.Content = eidtAssayItem;
            window.Width   = 400;
            window.Height  = 500;
            //window.ResizeMode = ResizeMode.NoResize;
            bool?bResult = window.ShowDialog();

            if (bResult.Value)
            {
                MessageBox.Show("化验项目新建完成!");
                UpdateAllDate();
            }
        }