Exemplo n.º 1
0
        private void EditItemBtn_Click(object sender, RoutedEventArgs e)
        {
            var temp = this.AllMaterialList.SelectedItem as CommContracts.MaterialItem;

            if (temp == null)
            {
                return;
            }

            // 新增物资
            var window = new Window();

            EditMaterialView eidtMaterial = new EditMaterialView(temp);

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

            if (bResult.Value)
            {
                MessageBox.Show("物资修改完成!");
                UpdateAllDate();
            }
        }
Exemplo n.º 2
0
        private void NewItemBtn_Click(object sender, RoutedEventArgs e)
        {
            // 新增物资
            var window = new Window();

            EditMaterialView eidtMaterial = new EditMaterialView();

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

            if (bResult.Value)
            {
                MessageBox.Show("物资新建完成!");
                UpdateAllDate();
            }
        }