public InspectionEditViewModel(InspectionListViewModel _vm, InspectionEditView _mw)
 {
     _InspectionListVM = _vm;
     _Window = _mw;
     OperationType = OpType.Add;
     InspectionObj = new InspectionOR();
     //UpdatetxtSource(_Window.gridContent);
     Init();
 }
        public InspectionEditViewModel(InspectionListViewModel _vm, InspectionEditView _mw, InspectionOR _InspectionObj)
        {
            _InspectionListVM = _vm;
            _Window = _mw;
            _SourceObj = _InspectionObj;

            OperationType = OpType.Alert;
            InspectionObj = new InspectionOR();
            InspectionObj.Clone(_InspectionObj);

            Init();
        }
 public override void Insert()
 {
     InspectionEditView _sta = new InspectionEditView(this);
     _sta.Owner = Global._MainWindow;
     _sta.ShowDialog();
 }
 public override void Update(object par)
 {
     if (par is InspectionOR)
     {
         InspectionEditView _sta = new InspectionEditView(this, par as InspectionOR);
         _sta.Owner = Global._MainWindow;
         _sta.ShowDialog();
     }
 }