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

            if (temp == null)
            {
                return;
            }

            // 新增供应商
            var window = new Window();

            EditSupplierView eidtSupplier = new EditSupplierView(temp);

            window.Content = eidtSupplier;
            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();

            EditSupplierView eidtSupplier = new EditSupplierView();

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

            if (bResult.Value)
            {
                MessageBox.Show("供应商新建完成!");
                UpdateAllDate();
            }
        }