public ProductWindowViewModel(ChildWindow aChildWindow, ObservableCollection<ProductTypeEntity> aProductTypeEntityList, /*ObservableCollection<UserEntity> aUserEntityList,*/ ProductWindowType aProductWindowType, ProductEntity aProductEntity) { childWindow = aChildWindow; ProductEntity = aProductEntity; productWindowType = aProductWindowType; //UserEntityList = aUserEntityList; ProductTypeEntityList = aProductTypeEntityList; //App app = Application.Current as App; //CanSetOutputNumber = app.UserInfo.GetUerRight(2010600); if (productWindowType == ProductWindowType.ADD) { IsAdd = true; } else { IsAdd = false; } if (productWindowType == ProductWindowType.View) { IsView = true; } else { IsView = false; } if (!String.IsNullOrWhiteSpace(ProductEntity.ManufactureNumber)) { Title = "生产令号:" + ProductEntity.ManufactureNumber; } OnOK = new DelegateCommand(OnOKCommand); OnCancel = new DelegateCommand(OnCancelCommand); }
public ProductWindowViewModel(ChildWindow aChildWindow, ObservableCollection <ProductTypeEntity> aProductTypeEntityList, /*ObservableCollection<UserEntity> aUserEntityList,*/ ProductWindowType aProductWindowType, ProductEntity aProductEntity) { childWindow = aChildWindow; ProductEntity = aProductEntity; productWindowType = aProductWindowType; //UserEntityList = aUserEntityList; ProductTypeEntityList = aProductTypeEntityList; //App app = Application.Current as App; //CanSetOutputNumber = app.UserInfo.GetUerRight(2010600); if (productWindowType == ProductWindowType.ADD) { IsAdd = true; } else { IsAdd = false; } if (productWindowType == ProductWindowType.View) { IsView = true; } else { IsView = false; } if (!String.IsNullOrWhiteSpace(ProductEntity.ManufactureNumber)) { Title = "生产令号:" + ProductEntity.ManufactureNumber; } OnOK = new DelegateCommand(OnOKCommand); OnCancel = new DelegateCommand(OnCancelCommand); }
public ProductWindow(ProductWindowType aProductWindowType, ObservableCollection <ProductTypeEntity> aProductTypeEntityList, ProductEntity aProductEntity) { InitializeComponent(); this.DataContext = new ProductWindowViewModel(this, aProductTypeEntityList, aProductWindowType, aProductEntity); }
public ProductWindow(ProductWindowType aProductWindowType, ObservableCollection<ProductTypeEntity> aProductTypeEntityList, ProductEntity aProductEntity) { InitializeComponent(); this.DataContext = new ProductWindowViewModel(this, aProductTypeEntityList, aProductWindowType, aProductEntity); }