private void SaveAs()
        {
            BatteryType btc = new BatteryType();                                //实例化一个新的model
            BatteryTypeEditViewModel btevm = new BatteryTypeEditViewModel(btc); //实例化一个新的view model

            btevm.Manufacturer              = _selectedItem.Manufacturer;
            btevm.Material                  = _selectedItem.Material;
            btevm.Name                      = _selectedItem.Name;
            btevm.CutoffDischargeVoltage    = _selectedItem.CutoffDischargeVoltage;
            btevm.FullyChargedEndCurrent    = _selectedItem.FullyChargedEndCurrent;
            btevm.FullyChargedEndingTimeout = _selectedItem.FullyChargedEndingTimeout;
            btevm.LimitedChargeVoltage      = _selectedItem.LimitedChargeVoltage;
            btevm.NominalVoltage            = _selectedItem.NominalVoltage;
            btevm.RatedCapacity             = _selectedItem.RatedCapacity;
            btevm.TypicalCapacity           = _selectedItem.TypicalCapacity;
            btevm.DisplayName               = "Battery Type-Save As";
            var BatteryTypeViewInstance = new BatteryTypeView();      //实例化一个新的view

            BatteryTypeViewInstance.DataContext = btevm;
            BatteryTypeViewInstance.ShowDialog();
            if (btevm.IsOK == true)
            {
                _batteryTypeService.SuperAdd(btc);
            }
        }
        private void Create()
        {
            BatteryType btc = new BatteryType();                                //实例化一个新的model
            BatteryTypeEditViewModel btevm = new BatteryTypeEditViewModel(btc); //实例化一个新的view model

            btevm.DisplayName = "Battery Type-Create";
            var BatteryTypeViewInstance = new BatteryTypeView();      //实例化一个新的view

            BatteryTypeViewInstance.DataContext = btevm;
            BatteryTypeViewInstance.ShowDialog();                   //设置viewmodel属性
            if (btevm.IsOK == true)
            {
                _batteryTypeService.SuperAdd(btc);
            }
        }
        private void Edit()
        {
            BatteryType btc = new BatteryType();                                //实例化一个新的model
            BatteryTypeEditViewModel btevm = new BatteryTypeEditViewModel(btc); //实例化一个新的view model

            btevm.Id           = _selectedItem.Id;
            btevm.Manufacturer = _selectedItem.Manufacturer;
            btevm.Material     = _selectedItem.Material;
            btevm.Name         = _selectedItem.Name;
            btevm.DisplayName  = "Battery Type-Edit";
            var BatteryTypeViewInstance = new BatteryTypeView();      //实例化一个新的view

            BatteryTypeViewInstance.DataContext = btevm;
            BatteryTypeViewInstance.ShowDialog();
            if (btevm.IsOK == true)
            {
                _batteryTypeService.SuperUpdate(btc);
            }
        }