private void AddOrUpdateColumn(string addOrUpdate) { v.Id = int.Parse(textBoxVideoCardId.Text); v.Manufacturer = textBoxVideoCardManufacturer.Text; v.Name = textBoxVideoCardName.Text; v.Memory = int.Parse(textBoxVideoCardMemory.Text); v.CoreClockMhz = int.Parse(textBoxVideoCardCoreClock.Text); v.BoostClockMhz = int.Parse(textBoxVideoCardBoostClock.Text); v.Price = double.Parse(textBoxVideoCardPrice.Text); bool success = addOrUpdate == "added" ? v.Insert(v) : v.Update(v); helperMethods.DisplayMessage(success, addOrUpdate, this, v, componentName, videoCardBrowseGV); }