private void btnAddNew_Click(object sender, RoutedEventArgs e)
        {
            EditMachineWindow window = new EditMachineWindow(null);

            window.ShowDialog();
            if (window.machineUpdated != null && window.excuteMode != EExcute.None)
            {
                var viewModel = new MachineViewModel();
                ConvertModelToViewModel(window.machineUpdated, viewModel);
                machineViewModelList.Add(viewModel);
                RenderData(machineViewModelList, dgMachineList);
            }
        }
        private void dgMachineList_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var itemClicked = dgMachineList.SelectedItem as MachineViewModel;

            if (itemClicked == null)
            {
                return;
            }
            EditMachineWindow window = new EditMachineWindow(itemClicked);

            window.ShowDialog();
            if (window.machineUpdated != null && window.excuteMode != EExcute.None)
            {
                if (window.excuteMode == EExcute.Delete)
                {
                    machineViewModelList.RemoveAll(r => r.MachineID == window.machineUpdated.MachineID);
                    RenderData(machineViewModelList, dgMachineList);
                }
                else
                {
                    ConvertModelToViewModel(window.machineUpdated, itemClicked);
                }
            }
        }