コード例 #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 Return_Click(object sender, RoutedEventArgs e)
        {
            RepairEquipment repair = DeviceMigrationsFactory.RepairEquipment;

            if (repair.apply_repair.Children.Contains(this.repair_Control))
            {
                repair.apply_repair.Children.Remove(this.repair_Control);
            }
        }