Ejemplo n.º 1
0
 private void Menu_Edit(object sender, RoutedEventArgs e)
 {
     ///弹出库位编辑框,库位表修改对应数据
     ///
     try
     {
         DataRowView           mySelectedElement = (DataRowView)datagridshelf.SelectedItem;
         string                shelf_id          = mySelectedElement.Row[0].ToString();
         string                shelf_area        = mySelectedElement.Row[1].ToString();
         string                shelf_row         = mySelectedElement.Row[2].ToString();
         string                shelf_column      = mySelectedElement.Row[3].ToString();
         string                shelf_status      = mySelectedElement.Row[4].ToString();
         WPFs.WPF_Shelf_Manual wPF_Shelf_Manual  = new WPFs.WPF_Shelf_Manual(this, mySelectedElement, "edit");
         wPF_Shelf_Manual.shelf_id.Text     = shelf_id;
         wPF_Shelf_Manual.shelf_area.Text   = shelf_area;
         wPF_Shelf_Manual.shelf_row.Text    = shelf_row;
         wPF_Shelf_Manual.shelf_column.Text = shelf_column;
         wPF_Shelf_Manual.shelf_status.Text = shelf_status;
         wPF_Shelf_Manual.Title             = "库位编辑";
         wPF_Shelf_Manual.ShowDialog();
     }
     catch (NullReferenceException)
     {
         MessageBox.Show("未选中编辑行");
     }
     catch (InvalidCastException)
     {
         MessageBox.Show("导入的excel不能编辑");
     }
 }
Ejemplo n.º 2
0
 private void Shelf_Add(object sender, RoutedEventArgs e)
 {
     ///弹出库位添加输入框,库位表添加数据
     ///
     WPFs.WPF_Shelf_Manual wPF_Shelf_Manual = new WPFs.WPF_Shelf_Manual(this, view, "add");
     wPF_Shelf_Manual.ShowDialog();
 }