private void Save_Edit(object sender, RoutedEventArgs e) { if (this.Ename.Equals("")) { JXMessageBox.Show(this,"设备名称不能为空!",MsgImage.Error); return; } int _Eid = int.Parse(this.ID.Content.ToString()); string name = this.Ename.Text; ComboBoxItem roomItem = (ComboBoxItem)this.roomBox.SelectedItem; int roomId = (int)roomItem.Tag; EquipmentClass _Edit = new EquipmentClass(); int state = _Edit.saveEditEquipment(_Eid, name, roomId); if (state == BaseRequest.SUCCESS) { EquipmentClass equitment = new EquipmentClass(); DataSet set = equitment.comingEquipment(); NewEquipment equipments = DeviceMigrationsFactory.NewEquipment; DeviceMigrationsFactory.NewEquipment.page.ShowPages(DeviceMigrationsFactory.NewEquipment.comingGrild, set, BaseRequest.PAGE_SIZE); JXMessageBox.Show(this, "编辑成功!", MsgImage.Success); this.Close(); } else { JXMessageBox.Show(this, "错误,请检查您是否正确操作!", MsgImage.Error); } }