diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-31 12:28:50 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-31 12:28:50 +0200 |
| commit | 4426f03255547932af78d1d227f09e3cf9e55158 (patch) | |
| tree | b18ac059d44bee9cec7687b8047a634aa928d729 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels | |
| parent | 941aa7e1ed4a0187bc45ae0e7c46d7c995340d41 (diff) | |
| parent | 7f05564656644b9af0500657a689c12805aee732 (diff) | |
| download | Tango-4426f03255547932af78d1d227f09e3cf9e55158.tar.gz Tango-4426f03255547932af78d1d227f09e3cf9e55158.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs index 5f2d86b40..e9f2404e0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs @@ -89,11 +89,13 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels public RelayCommand SearchCommand { get; set; } public RelayCommand CopyToClipBoardCommand { get; set; } + public RelayCommand CopyRelateObjectIDCommand { get; set; } public MainViewVM() { ActionLogs = new ObservableCollection<ActionLog>(); SearchCommand = new RelayCommand(GetActionLogs, ()=> !IsRunning); + CopyRelateObjectIDCommand = new RelayCommand(CopyRelateObjectID); CopyToClipBoardCommand = new RelayCommand(CopyToClipBoard, () => SelectedActionLog != null && SelectedActionLog.DifferenceObject != null); DateTime now = DateTime.Now; StartSelectedDate = now.AddMonths(-1); @@ -116,7 +118,12 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels System.Windows.Clipboard.SetDataObject(data); } - + private void CopyRelateObjectID() + { + DataObject data = new DataObject(SelectedActionLog.RelatedObjectGuid); + System.Windows.Clipboard.SetDataObject(data); + } + /// <summary> /// New Database Query with search parameters. Initialization ActionLogs property. /// </summary> @@ -138,6 +145,7 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels (x => filter == null || (x.ID.ToString().ToLower().StartsWith(filter) || (x.RelatedObjectName != null && x.RelatedObjectName.ToLower().StartsWith(filter)) + || (x.RelatedObjectGuid != null && x.RelatedObjectGuid.ToLower().StartsWith(filter)) || (x.User != null && x.User.Contact != null && x.User.Contact.FullName.ToLower().StartsWith(filter))))) .BuildAsync(); IsRunning = false; |
