Exemplo n.º 1
0
        private void btn_edit_comartment_Click(object sender, EventArgs e)
        {
            var comp = listBoxCompartment.SelectedItem as Compartment;

            if (comp == null)
            {
                return;
            }

            FrmAddCompartment tmp = new FrmAddCompartment(comp);

            tmp.ShowDialog();

            //if (tmp.VALID)
            //    inventory.COMPARTMENTS.Add(tmp.COMPARTMENT);

            updateCompartmentList();
        }
Exemplo n.º 2
0
        /// <summary>
        /// btn event for compartment adding
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddCompartment_Click(object sender, EventArgs e)
        {
            if (listBoxContainer.SelectedItem == null)
            {
                printError("No Container Selected");
                return;
            }

            UInt32 container_id = (listBoxContainer.SelectedItem as Container).ID;

            FrmAddCompartment tmp = new FrmAddCompartment((UInt32)inventory.COMPARTMENTS.Count, container_id);

            tmp.ShowDialog();

            if (tmp.VALID)
            {
                inventory.COMPARTMENTS.Add(tmp.COMPARTMENT);
            }

            updateCompartmentList();
        }