//What the Admin can use
        private void AdminButtons(object sender, EventArgs e)
        {
            Button sendingBox = (Button)sender;

            switch (sendingBox.Name)
            {
            case "Change1":
                if (!string.IsNullOrEmpty(NewName1.Text))
                {
                    Bag1Label.Text = NewName1.Text;
                    Properties.Settings.Default["Name1"] = Bag1Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice1.Text))
                {
                    Price1Label.Text = NewPrice1.Text;
                    Properties.Settings.Default["Price1"] = Price1Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName1.Clear();
                NewPrice1.Clear();
                break;

            case "Change2":
                if (!string.IsNullOrEmpty(NewName2.Text))
                {
                    Bag2Label.Text = NewName2.Text;
                    Properties.Settings.Default["Name2"] = Bag2Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice2.Text))
                {
                    Price2Label.Text = NewPrice2.Text;
                    Properties.Settings.Default["Price2"] = Price2Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName2.Clear();
                NewPrice2.Clear();
                break;

            case "Change3":
                if (!string.IsNullOrEmpty(NewName3.Text))
                {
                    Jewelry1Label.Text = NewName3.Text;
                    Properties.Settings.Default["Name3"] = Jewelry1Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice3.Text))
                {
                    Price3Label.Text = NewPrice3.Text;
                    Properties.Settings.Default["Price3"] = Price3Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName3.Clear();
                NewPrice3.Clear();
                break;

            case "Change4":
                if (!string.IsNullOrEmpty(NewName4.Text))
                {
                    Jewelry2Label.Text = NewName4.Text;
                    Properties.Settings.Default["Name4"] = Jewelry2Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice4.Text))
                {
                    Price4Label.Text = NewPrice4.Text;
                    Properties.Settings.Default["Price4"] = Price4Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName4.Clear();
                NewPrice4.Clear();
                break;

            case "Change5":
                if (!string.IsNullOrEmpty(NewName5.Text))
                {
                    WalletLabel.Text = NewName5.Text;
                    Properties.Settings.Default["Name5"] = WalletLabel.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice5.Text))
                {
                    Price5Label.Text = NewPrice5.Text;
                    Properties.Settings.Default["Price5"] = Price5Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName5.Clear();
                NewPrice5.Clear();
                break;

            case "Change6":
                if (!string.IsNullOrEmpty(NewName6.Text))
                {
                    HatLabel.Text = NewName6.Text;
                    Properties.Settings.Default["Name6"] = HatLabel.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice6.Text))
                {
                    Price6Label.Text = NewPrice6.Text;
                    Properties.Settings.Default["Price6"] = Price6Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName6.Clear();
                NewPrice6.Clear();
                break;
            }
        }
        //What the Admin can use
        private void AdminButtons(object sender, EventArgs e)
        {
            Button sendingBox = (Button)sender;

            switch (sendingBox.Name)
            {
            case "Change1":
                if (!string.IsNullOrEmpty(NewName1.Text))
                {
                    Tshirt1Label.Text = NewName1.Text;
                    Properties.Settings.Default["Name12"] = Tshirt1Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice1.Text))
                {
                    Price1Label.Text = NewPrice1.Text;
                    Properties.Settings.Default["Price12"] = Price1Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName1.Clear();
                NewPrice1.Clear();
                break;

            case "Change2":
                if (!string.IsNullOrEmpty(NewName2.Text))
                {
                    Tshirt2Label.Text = NewName2.Text;
                    Properties.Settings.Default["Name13"] = Tshirt2Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice2.Text))
                {
                    Price2Label.Text = NewPrice2.Text;
                    Properties.Settings.Default["Price13"] = Price2Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName2.Clear();
                NewPrice2.Clear();
                break;

            case "Change3":
                if (!string.IsNullOrEmpty(NewName3.Text))
                {
                    Tshirt3Label.Text = NewName3.Text;
                    Properties.Settings.Default["Name14"] = Tshirt3Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice3.Text))
                {
                    Price3Label.Text = NewPrice3.Text;
                    Properties.Settings.Default["Price14"] = Price3Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName3.Clear();
                NewPrice3.Clear();
                break;

            case "Change4":
                if (!string.IsNullOrEmpty(NewName4.Text))
                {
                    Tshirt4Label.Text = NewName4.Text;
                    Properties.Settings.Default["Name15"] = Tshirt4Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice4.Text))
                {
                    Price4Label.Text = NewPrice4.Text;
                    Properties.Settings.Default["Price15"] = Price4Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName4.Clear();
                NewPrice4.Clear();
                break;
            }
        }
Esempio n. 3
0
        //What the Admin can use
        private void AdminButtons(object sender, EventArgs e)
        {
            Button sendingBox = (Button)sender;

            switch (sendingBox.Name)
            {
            case "Change1":
                if (!string.IsNullOrEmpty(NewName1.Text))
                {
                    Jeans1Label.Text = NewName1.Text;
                    Properties.Settings.Default["Name7"] = Jeans1Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice1.Text))
                {
                    Price1Label.Text = NewPrice1.Text;
                    Properties.Settings.Default["Price7"] = Price1Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName1.Clear();
                NewPrice1.Clear();
                break;

            case "Change2":
                if (!string.IsNullOrEmpty(NewName2.Text))
                {
                    Jeans2Label.Text = NewName2.Text;
                    Properties.Settings.Default["Name8"] = Jeans2Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice2.Text))
                {
                    Price2Label.Text = NewPrice2.Text;
                    Properties.Settings.Default["Price8"] = Price2Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName2.Clear();
                NewPrice2.Clear();
                break;

            case "Change3":
                if (!string.IsNullOrEmpty(NewName3.Text))
                {
                    Jeans3Label.Text = NewName3.Text;
                    Properties.Settings.Default["Name9"] = Jeans3Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice3.Text))
                {
                    Price3Label.Text = NewPrice3.Text;
                    Properties.Settings.Default["Price9"] = Price3Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName3.Clear();
                NewPrice3.Clear();
                break;

            case "Change4":
                if (!string.IsNullOrEmpty(NewName4.Text))
                {
                    Jeans4Label.Text = NewName4.Text;
                    Properties.Settings.Default["Name10"] = Jeans4Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice4.Text))
                {
                    Price4Label.Text = NewPrice4.Text;
                    Properties.Settings.Default["Price10"] = Price4Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName4.Clear();
                NewPrice4.Clear();
                break;

            case "Change5":
                if (!string.IsNullOrEmpty(NewName5.Text))
                {
                    Jeans5Label.Text = NewName5.Text;
                    Properties.Settings.Default["Name11"] = Jeans5Label.Text;
                }
                if (!string.IsNullOrEmpty(NewPrice5.Text))
                {
                    Price5Label.Text = NewPrice5.Text;
                    Properties.Settings.Default["Price11"] = Price5Label.Text;
                }
                Properties.Settings.Default.Save();
                NewName5.Clear();
                NewPrice5.Clear();
                break;
            }
        }