62 lines
2.0 KiB
C#
62 lines
2.0 KiB
C#
using Ping9719.WpfEx;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Web.UI.WebControls;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
using 智能仓储WCS管理系统.ViewModels;
|
|
using DataGrid = System.Windows.Controls.DataGrid;
|
|
|
|
namespace 智能仓储WCS管理系统
|
|
{
|
|
/// <summary>
|
|
/// InInventoryView.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class OutInventoryDocumentView : UserControlBase
|
|
{
|
|
public OutInventoryDocumentViewModel viewModel = new OutInventoryDocumentViewModel();
|
|
public OutInventoryDocumentView()
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = viewModel;
|
|
}
|
|
private void DataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (viewModel.SelectedataGridItem != null)
|
|
{
|
|
viewModel.SelectedataGridItem.IsSelected = !viewModel.SelectedataGridItem.IsSelected;
|
|
this.dg.UnselectAllCells();//取消选中 避免手动点击check选项时反选失败 和重新点击该项时反选失败
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
private void DataGrid_ItemDataBound(object sender, DataGridItemEventArgs e)
|
|
{
|
|
if (e.Item.ItemType != ListItemType.Header && e.Item.ItemType != ListItemType.Pager)
|
|
{
|
|
if (e.Item.Cells[1].Text.Length > 20)
|
|
{
|
|
e.Item.Cells[1].Text = e.Item.Cells[1].Text.Substring(0, 20) + "...";
|
|
}
|
|
if (e.Item.Cells[2].Text.Length > 20)
|
|
{
|
|
e.Item.Cells[2].Text = e.Item.Cells[2].Text.Substring(0, 20) + "...";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|