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 { /// /// BomMaintenancePageView.xaml 的交互逻辑 /// 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); } } } } }