예제 #1
0
        //报废设备
        private void Scrapping(object sender, RoutedEventArgs e)
        {
            if (moveGrid.Children != null)
            {
                moveGrid.Children.Clear();
            }
            EquipmentScrapping scrapping = DeviceMigrationsFactory.EquipmentScrapping;

            moveGrid.Children.Add(scrapping);
            scrapping.SetValue(Grid.RowProperty, 0);
            scrapping.SetValue(Grid.ColumnProperty, 0);
        }
예제 #2
0
        //报废申请
        private void Device_Mains(object sender, RoutedEventArgs e)
        {
            if (moveGrid.Children != null)
            {
                moveGrid.Children.Clear();
            }
            EquipmentScrapping _Scrap  = DeviceMigrationsFactory.EquipmentScrapping;
            EquipmentClass     _Eclass = new EquipmentClass();
            //DataSet _Scrap_Set = _Eclass.getWorkEquipment();
            DataSet _Scrap_Set = _Eclass.getScrappingEquipment();

            _Scrap.page.ShowPages(_Scrap.scrapGrid, _Scrap_Set, BaseRequest.PAGE_SIZE);
            moveGrid.Children.Add(_Scrap);
            _Scrap.SetValue(Grid.RowProperty, 0);
            _Scrap.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);
            }
        }