You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AUCMA_SCADA/Aucma.Core.SheetMetal/Views/BomMaintenancePageView.xaml.cs

55 lines
1.6 KiB
C#

using Aucma.Core.SheetMetal.ViewModels;
using System.Windows.Controls;
using System.Windows.Input;
using Aucma.Core.SheetMetal.Common;
using System.Data;
using Admin.Core.Model;
namespace Aucma.Core.SheetMetal.Views
{
/// <summary>
/// BomMaintenancePageView.xaml 的交互逻辑
/// </summary>
public partial class BomMaintenancePageView : UserControl
{
BomMaintenancePageViewModel model = new BomMaintenancePageViewModel();
public BomMaintenancePageView()
{
InitializeComponent();
this.DataContext = model;
}
//在载入行的时候在行表头添加编号
private void dgvMH_LoadingRow(object sender, DataGridRowEventArgs e)
{
e.Row.Header = (e.Row.GetIndex() + 1).ToString();
}
private void queryParam_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
CommHelper.OpenOsk();
}
private void dgv1MH_LoadingRow(object sender, DataGridRowEventArgs e)
{
e.Row.Header = (e.Row.GetIndex() + 1).ToString();
}
private void dgvMH_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var dataGrid = (DataGrid)sender;
if (dataGrid != null && dataGrid.SelectedItem != null)
{
var selectedRows = (SmSyncModel)dataGrid.SelectedItems[0];
if (selectedRows != null)
{
model.SelectRow(selectedRows);
}
}
}
}
}