public ProductTypeEdit(PRODUCT_TYPE pt, Product_typeVM ptvm) { InitializeComponent(); Product_typeEditVM vm = new Product_typeEditVM(pt, ptvm); this.DataContext = vm; }
public ProductTypeList() { InitializeComponent(); Product_typeVM ptVM = new Product_typeVM(); this.DataContext = ptVM; }
public Product_typeEditVM(PRODUCT_TYPE pt, Product_typeVM vm) { if (pt == null) { this.Product_type_cd = ""; this.Name = ""; this.cv = "insert"; } else { this.Product_type_cd = pt.PRODUCT_TYPE_CD; this.Name = pt.NAME; this.cv = "update"; } this.vm = vm; OKCommand = new RelayCommand <Window>((p) => { return(p != null ? true : false); }, (p) => { OKevent(p); }); CancelCommand = new RelayCommand <Window>((p) => true, (p) => { p.Close(); }); }