Esempio n. 1
0
        /// <summary>
        /// Runs the menu for removing a ware.
        /// </summary>
        private void WareRemoveMenu()
        {
            string ID = CollectID();

            if (Support.IDExist(ID, SQLCode.SQLControl.DatabaseInUse))
            {
                if (WareModifier.RemoveWare(ID))
                {
                    ProgressInformer("{0} was removed.", ID);
                }
                else
                {
                    ProgressInformer("{0} was not removed.", ID);
                }
            }
            else
            {
                OutPut.DisplayMessage("ID does not exist");
                Support.WaitOnKeyInput();
            }

            void ProgressInformer(string message, string part)
            {
                OutPut.FullScreenClear();
                string text = String.Format(message, part);

                OutPut.DisplayMessage(text);
                Support.WaitOnKeyInput();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Runs the menu for removing any amount from a ware.
        /// </summary>
        private void WareRemoveAmountMenu()
        {
            string ID = CollectID();

            if (Support.IDExist(ID, SQLCode.SQLControl.DatabaseInUse))
            {
                WareModifier.RemoveFromWare(ID, CollectAmount());
            }
            else
            {
                OutPut.DisplayMessage("ID does not exist");
                Support.WaitOnKeyInput();
            }
        }