private void btnCategoryUpdate_Click(object sender, EventArgs e)
        {
            int index = 0;

            try
            {
                index = lvStore.SelectedIndices[0];
                if (txtStoreName.Text != "")
                {
                    bool b = StoreRepo.checkIfStoreExists(txtStoreName.Text);
                    if (b)
                    {
                        MessageBox.Show("This store name already exists, \n do you wish to proceed?.");
                        double num = 0;
                        bool   c   = double.TryParse(txtContactNumber.Text, out num);
                        if (c)
                        {
                            StoreRepo.update(this.id, txtStoreName.Text, txtAddress.Text, num);
                            btnCategoryAdd.Enabled    = true;
                            btnCategoryDelete.Enabled = false;
                            btnCategoryUpdate.Enabled = false;
                            List <SMLIB.Entity.Store> s = StoreRepo.retrieve();
                            initStore(s);
                            MessageBox.Show("Update successful.");
                            clearAll();
                        }
                        else
                        {
                            MessageBox.Show("Invalid contact number.");
                        }
                    }
                    else
                    {
                        double num = 0;
                        bool   c   = double.TryParse(txtContactNumber.Text, out num);
                        if (c)
                        {
                            StoreRepo.update(this.id, txtStoreName.Text, txtAddress.Text, num);
                            btnCategoryAdd.Enabled    = true;
                            btnCategoryDelete.Enabled = false;
                            btnCategoryUpdate.Enabled = false;
                            List <SMLIB.Entity.Store> s = StoreRepo.retrieve();
                            initStore(s);
                            MessageBox.Show("Update successful.");
                            clearAll();
                        }
                        else
                        {
                            MessageBox.Show("Invalid contact number.");
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Update value can not be empty.");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Please select an item to update");
            }
        }