示例#1
0
        private void Delivery(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            if (moveGrid.Children != null)
            {
                moveGrid.Children.Clear();
            }
            EquipmentDelivery delivery = DeviceMigrationsFactory.EquipmentDelivery;

            moveGrid.Children.Add(delivery);
            delivery.SetValue(Grid.RowProperty, 0);
            delivery.SetValue(Grid.ColumnProperty, 0);
        }
示例#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);
        }
示例#3
0
        //报修设备
        private void Device_Migrations(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            TreeViewItem assets = ((sender as TreeView).SelectedItem as TreeViewItem);

            if (moveGrid.Children != null)
            {
                moveGrid.Children.Clear();
            }
            string migrations = assets.Uid.ToString();

            if (migrations == null || "".Equals(migrations))
            {
                return;
            }
            if (migrations.Equals("repair"))
            {
                if (moveGrid.Children != null)
                {
                    moveGrid.Children.Clear();
                }
                Equipments equipments = DeviceMigrationsFactory.Equipments;
                moveGrid.Children.Add(equipments);
                equipments.SetValue(Grid.RowProperty, 0);
                equipments.SetValue(Grid.ColumnProperty, 0);
            }
            else if (migrations.Equals("incoming"))
            {
                if (moveGrid.Children != null)
                {
                    moveGrid.Children.Clear();
                }
                NewEquipment equipments = DeviceMigrationsFactory.NewEquipment;
                moveGrid.Children.Add(equipments);
                equipments.SetValue(Grid.RowProperty, 0);
                equipments.SetValue(Grid.ColumnProperty, 0);
            }
            else if (migrations.Equals("delivery"))
            {
                if (moveGrid.Children != null)
                {
                    moveGrid.Children.Clear();
                }
                EquipmentDelivery equipments = DeviceMigrationsFactory.EquipmentDelivery;
                moveGrid.Children.Add(equipments);
                equipments.SetValue(Grid.RowProperty, 0);
                equipments.SetValue(Grid.ColumnProperty, 0);
            }
            else if (migrations.Equals("incoming"))
            {
                if (moveGrid.Children != null)
                {
                    moveGrid.Children.Clear();
                }
                EquipmentDelivery equipments = DeviceMigrationsFactory.EquipmentDelivery;
                moveGrid.Children.Add(equipments);
                equipments.SetValue(Grid.RowProperty, 0);
                equipments.SetValue(Grid.ColumnProperty, 0);
            }
            else if (migrations.Equals("migrate"))
            {
                if (moveGrid.Children != null)
                {
                    moveGrid.Children.Clear();
                }
                DeviceMove equipments = DeviceMigrationsFactory.DeviceMove;
                moveGrid.Children.Add(equipments);
                equipments.SetValue(Grid.RowProperty, 0);
                equipments.SetValue(Grid.ColumnProperty, 0);
            }
            else if (migrations.Equals("scrap"))
            {
                if (moveGrid.Children != null)
                {
                    moveGrid.Children.Clear();
                }
                EquipmentScrapping equipments = DeviceMigrationsFactory.EquipmentScrapping;
                moveGrid.Children.Add(equipments);
                equipments.SetValue(Grid.RowProperty, 0);
                equipments.SetValue(Grid.ColumnProperty, 0);
            }
            else if (migrations.Equals("mains"))
            {
                if (moveGrid.Children != null)
                {
                    moveGrid.Children.Clear();
                }
                DevicePower equipments = DeviceMigrationsFactory.DevicePower;
                moveGrid.Children.Add(equipments);
                equipments.SetValue(Grid.RowProperty, 0);
                equipments.SetValue(Grid.ColumnProperty, 0);
            }
        }