private void Clear()
 {
     SaveButton.Enabled   = true;
     UpdateButton.Enabled = false;
     BrandTextBox.Clear();
     BrandTextBox.Focus();
 }
Exemple #2
0
        private void AddPhoneButton_Click(object sender, EventArgs e)
        {
            // create a cellphone object

            CellPhoneInventory myphone = new CellPhoneInventory();

            // get the phone data

            getdata(myphone);

            //Add the cell phone object to the list

            phoneList.Add(myphone);

            // add the entry to the list box

            PhoneListBox.Items.Add(myphone.Brand + " " + myphone.Model);

            // clear the contents of the textbox

            BrandTextBox.Clear();
            ModelTextBox.Clear();
            PriceTextBox.Clear();

            BrandTextBox.Focus();
        }