RoleAddOrEditView.xaml.cs
852 Bytes
using HHECS.RobotTool.ViewModel.AccountVM;
using Microsoft.Extensions.DependencyInjection;
using RobotTool;
using System.Windows;
namespace HHECS.RobotTool.View.AccountView
{
/// <summary>
/// RoleAddOrEditView.xaml 的交互逻辑
/// </summary>
public partial class RoleAddOrEditView : Window
{
public RoleAddOrEditView()
{
InitializeComponent();
var vm = App.Current.Services.GetService<RoleAddOrEditVM>()!;
vm.Owner = this;
vm.InitialData();
DataContext = vm;
}
public RoleAddOrEditView(int roleId)
{
InitializeComponent();
var vm = App.Current.Services.GetService<RoleAddOrEditVM>()!;
vm.Owner = this;
vm.InitialData(roleId);
DataContext = vm;
}
}
}