Beispiel #1
0
        private void Move_Click(object sender, RoutedEventArgs e)
        {
            EquipmentClass _Eclass = new EquipmentClass();
            var a = this.MoveGrid.SelectedItem;
            var b = a as DataRowView;
            int _Eid = Convert.ToInt32(b.Row[0]);
            MsgResult r = JXMessageBox.Show(this, "您需要对此设备迁移?", "提示", MsgButton.Yes_No_Cancel, MsgImage.Warning);
            //MessageBox.Show(r.ToString());
            if (r == MsgResult.OK)
            {
                int state = _Eclass.moveEquipment(_Eid);
                if (state == BaseRequest.SUCCESS)
                {
                    DataSet _Repair_Set = _Eclass.getWorkEquipment();
                    this.page.ShowPages(this.MoveGrid, _Repair_Set, BaseRequest.PAGE_SIZE);
                    JXMessageBox.Show(this, "申请迁移成功", MsgImage.Success);
                    DeviceMove move = DeviceMigrationsFactory.DeviceMove;
                    DataSet moveSet=_Eclass.getMoveEquipment();
                    move.page.ShowPages(move.removeGrid, moveSet, BaseRequest.PAGE_SIZE);

                }
                else
                {
                    JXMessageBox.Show(this, "操作失败!系统异常,请联系管理员!", MsgImage.Error);
                }
            }
        }
Beispiel #2
0
 //设备迁移
 private void Device_Move(object sender, RoutedEventArgs e)
 {
     if (moveGrid.Children != null) moveGrid.Children.Clear();
     DeviceMove deviceMove = DeviceMigrationsFactory.DeviceMove;
     EquipmentClass _Eclass = new EquipmentClass();
     //DataSet _RemoveSet = _Eclass.getWorkEquipment();
     DataSet _RemoveSet = _Eclass.getMoveEquipment();
     deviceMove.page.ShowPages(deviceMove.removeGrid, _RemoveSet, BaseRequest.PAGE_SIZE);
     moveGrid.Children.Add(deviceMove);
     deviceMove.SetValue(Grid.RowProperty, 0);
     deviceMove.SetValue(Grid.ColumnProperty, 0);
 }