public RelayCommandCargo OpenOutputCargoWindowCommand get return new RelayCommandCargocargo = if cargo == null return;
This is a property that returns a RelayCommand object that takes a Cargo object as a parameter. When executed, it opens a new OutputCargoWindow and sets its DataContext to an instance of OutputCargoViewModel. It then sets the Cargo property of the OutputCargoViewModel to the Cargo object passed as a parameter. After the window is closed, it refreshes the Cargos collection by calling the Select method of a CargoProvider object. It also retrieves all records from a RecordProvider object, calculates the sum of input and output counts for each cargo item, and updates the Sum property of the corresponding Cargo object
原文地址: https://www.cveoy.top/t/topic/dwPz 著作权归作者所有。请勿转载和采集!