Exemplo n.º 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);
               }
           }
        }
Exemplo n.º 2
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);
                }
            }
        }
Exemplo n.º 3
0
 private void Delivery_Click(object sender, RoutedEventArgs e)
 {
     EquipmentClass _Eclass = new EquipmentClass();
     var a = this.deliveryGrid.SelectedItem;
     var b = a as DataRowView;
     int _Eid = Convert.ToInt32(b.Row[0]);
     MsgResult r = JXMessageBox.Show(this, "您需要对此设备迁移?", "提示", MsgButton.Yes_No_Cancel, MsgImage.Exclamation);
     //MessageBox.Show(r.ToString());
     if (r == MsgResult.OK)
     {
         int state = _Eclass.outRoomEquipment(_Eid);
         if (state == BaseRequest.SUCCESS)
         {
             DataSet _OutSet = _Eclass.getWorkEquipment();
             this.page.ShowPages(this.deliveryGrid, _OutSet, BaseRequest.PAGE_SIZE);
             JXMessageBox.Show(this, "申请出库成功", MsgImage.Success);
             EquipmentDelivery delivery = DeviceMigrationsFactory.EquipmentDelivery;
             DataSet deliverySet = _Eclass.getDeliverEquipment();
             delivery.page.ShowPages(delivery.outGird, deliverySet, BaseRequest.PAGE_SIZE);
         }
         else
         {
             JXMessageBox.Show(this, "操作失败!系统异常,请联系管理员!", MsgImage.Error);
         }
     }
 }
Exemplo n.º 4
0
        private void Scrapping_Click(object sender, RoutedEventArgs e)
        {
            EquipmentClass _Eclass = new EquipmentClass();
            var a = this.scrappingGrid.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.scrapEquipment(_Eid);
                if (state == BaseRequest.SUCCESS)
                {
                    DataSet _Scrapping_Set = _Eclass.getWorkEquipment();
                    this.page.ShowPages(this.scrappingGrid, _Scrapping_Set, BaseRequest.PAGE_SIZE);

                    JXMessageBox.Show(this, "申请报废成功", MsgImage.Success);
                    EquipmentScrapping scrapping = DeviceMigrationsFactory.EquipmentScrapping;
                    DataSet scrappingSet = _Eclass.getScrappingEquipment();
                    scrapping.page.ShowPages(scrapping.scrapGrid, scrappingSet, BaseRequest.PAGE_SIZE);
                }
                else
                {
                    JXMessageBox.Show(this, "操作失败!系统异常,请联系管理员!", MsgImage.Error);
                }
            }
        }
 private void Out_Click(object sender, RoutedEventArgs e)
 {
     EquipmentClass _Eclass = new EquipmentClass();
     DataSet _OutSet = _Eclass.getWorkEquipment();
     TakeDelivery td = new TakeDelivery();
     td.page.ShowPages(td.deliveryGrid, _OutSet, BaseRequest.PAGE_SIZE);
     //this.apply_repair.Children.Add(tr);//.Add(_Repair);
     //JXMessageBox.Show(Window.GetWindow(this)
     td.Owner = Window.GetWindow(this);
     td.ShowDialog();
 }