예제 #1
0
        private void Repair_Click(object sender, RoutedEventArgs e)
        {
            EquipmentClass _Eclass = new EquipmentClass();
            var a = this.repairGrid.SelectedItem;
            var b = a as DataRowView;
            int _Eid = Convert.ToInt32(b.Row[0]);
           MsgResult r =JXMessageBox.Show(this, "您需要对此设备进修报修?", "提示", MsgButton.Yes_No_Cancel, MsgImage.Question);
           if (r == MsgResult.OK)
           {
               int state = _Eclass.repairEquipment(_Eid);
               if (state == BaseRequest.SUCCESS)
               {
                   DataSet _Repair_Set = _Eclass.getWorkEquipment();
                   this.page.ShowPages(this.repairGrid, _Repair_Set, BaseRequest.PAGE_SIZE);

                   JXMessageBox.Show(this, "申请报修成功", MsgImage.Success);
                   RepairEquipment repair = DeviceMigrationsFactory.RepairEquipment;
                   DataSet repairSet = _Eclass.getRepairEquipment();
                   repair.page.ShowPages(repair.repair_Grid, repairSet, BaseRequest.PAGE_SIZE);
               }
               else
               {
                   JXMessageBox.Show(this, "操作失败!系统异常,请联系管理员!", MsgImage.Error);
               }
           }
        }
예제 #2
0
        //报修设备申请
        private void Device_Repair(object sender, RoutedEventArgs e)
        {
            if (moveGrid.Children != null) moveGrid.Children.Clear();
            RepairEquipment _RepairEquipment = DeviceMigrationsFactory.RepairEquipment;
            EquipmentClass _Eclass = new EquipmentClass();

            //Equipments _Repair = DeviceMigrationsFactory.Equipments;
            //EquipmentClass _Eclass = new EquipmentClass();
           // DataSet _OutSet = _Eclass.getWorkEquipment();
            DataSet _OutSet = _Eclass.getRepairEquipment();
            _RepairEquipment.page.ShowPages(_RepairEquipment.repair_Grid, _OutSet, BaseRequest.PAGE_SIZE);
            moveGrid.Children.Add(_RepairEquipment);
            _RepairEquipment.SetValue(Grid.RowProperty, 0);
            _RepairEquipment.SetValue(Grid.ColumnProperty, 0);
        }