예제 #1
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);
         }
     }
 }
예제 #2
0
 //出库
 private void Device_Out(object sender, RoutedEventArgs e)
 {
     if (moveGrid.Children != null) moveGrid.Children.Clear();
     EquipmentDelivery _Delivery = DeviceMigrationsFactory.EquipmentDelivery;
     EquipmentClass _Eclass = new EquipmentClass();
     //DataSet _OutSet=_Eclass.getWorkEquipment();
     DataSet _OutSet = _Eclass.getDeliverEquipment();
     _Delivery.page.ShowPages(_Delivery.outGird, _OutSet, BaseRequest.PAGE_SIZE);
     moveGrid.Children.Add(_Delivery);
     _Delivery.SetValue(Grid.RowProperty, 0);
     _Delivery.SetValue(Grid.ColumnProperty, 0);
 }