private void EditItemBtn_Click(object sender, RoutedEventArgs e) { var temp = this.AllStorehouseList.SelectedItem as CommContracts.StoreRoom; if (temp == null) { return; } // 新增库房 var window = new Window(); EditStorehouseView eidtStorehouse = new EditStorehouseView(temp); window.Content = eidtStorehouse; window.Width = 400; window.Height = 500; //window.ResizeMode = ResizeMode.NoResize; bool?bResult = window.ShowDialog(); if (bResult.Value) { MessageBox.Show("库房修改完成!"); UpdateAllDate(); } }
private void NewItemBtn_Click(object sender, RoutedEventArgs e) { // 新增库房 var window = new Window(); EditStorehouseView eidtStorehouse = new EditStorehouseView(); window.Content = eidtStorehouse; window.Width = 400; window.Height = 500; //window.ResizeMode = ResizeMode.NoResize; bool?bResult = window.ShowDialog(); if (bResult.Value) { MessageBox.Show("库房新建完成!"); UpdateAllDate(); } }