Beispiel #1
0
 public void DeleteIpModelExecute(object parameter)
 {
     if (this.IpModel != null && this.IpModel.Id != 0)
     {
         IpModelStore.DelIpModel(this.IpModel);
     }
 }
 public void SaveIpModelExecute(object parameter)
 {
     if (parameter is Button)
     {
         Button button = parameter as Button;
         if (this.IpModel == null)
         {
             //新增
             ControllerCenter.Model.IpModel p = new ControllerCenter.Model.IpModel();
             IpModelStore.AddIpModel(p);
             MessageBox.Show("新增成功!");
         }
         else
         {
             //修改
             this.IpModel.IpName = this.IpName;
             IpModelStore.ModifyIpModel(this.IpModel);
             MessageBox.Show("修改成功!");
         }
     }
     // this._IpModelInfo.DialogResult = true;
     // this._IpModelInfo.Close();
 }
Beispiel #3
0
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     ControllerCenter.Model.IpModel obj = new Model.IpModel();
     obj = this.DataContext as ControllerCenter.Model.IpModel;
     IpModelStore.ModifyIpModel(obj);
 }