Exemplo n.º 1
0
 // Constructors ------------------------------------------------------------------------------------------------------------------------
 public ModifyProductScreen(MainScreen mainScreen)
 {
     this.mainScreen = mainScreen;
     InitializeComponent();
     CandidatePartsDataGrid.DataSource  = Inventory.AllParts;
     AssociatedPartsDataGrid.DataSource = mainScreen.currentSelectedProduct.AssociatedParts;
     ID_Textbox.Text       = mainScreen.currentSelectedProduct.ProductID.ToString();
     NameTextbox.Text      = mainScreen.currentSelectedProduct.Name;
     InventoryTextbox.Text = mainScreen.currentSelectedProduct.InStock.ToString();
     PriceTextbox.Text     = mainScreen.currentSelectedProduct.Price.ToString();
     MinTextbox.Text       = mainScreen.currentSelectedProduct.Min.ToString();
     MaxTextbox.Text       = mainScreen.currentSelectedProduct.Max.ToString();
     partsToAssociate      = mainScreen.currentSelectedProduct.AssociatedParts;
 }
Exemplo n.º 2
0
        // Constructors ------------------------------------------------------------------------------------------------------------------------
        public ModifyPartScreen(MainScreen mainScreen)
        {
            this.mainScreen = mainScreen;
            InitializeComponent();
            ID_Textbox.Text       = mainScreen.currentSelectedPart.PartID.ToString();
            NameTextbox.Text      = mainScreen.currentSelectedPart.Name;
            PriceCostTextbox.Text = mainScreen.currentSelectedPart.Price.ToString();
            InventoryTextbox.Text = mainScreen.currentSelectedPart.InStock.ToString();
            MinTextbox.Text       = mainScreen.currentSelectedPart.Min.ToString();
            MaxTextbox.Text       = mainScreen.currentSelectedPart.Max.ToString();

            if (mainScreen.currentSelectedPart is Inhouse)
            {
                Inhouse part = (Inhouse)mainScreen.currentSelectedPart;
                InHouseRadioButton.Checked = true;
                IO_Textbox.Text            = part.MachineID.ToString();
            }
            else
            {
                Outsourced part = (Outsourced)mainScreen.currentSelectedPart;
                OutsourcedRadioButton.Checked = true;
                IO_Textbox.Text = part.CompanyName;
            }
        }
Exemplo n.º 3
0
 // Constructors ------------------------------------------------------------------------------------------------------------------------
 public AddPartScreen(MainScreen mainScreen)
 {
     this.mainScreen = mainScreen;
     InitializeComponent();
 }