private void UpdateItem_Click(object sender, RoutedEventArgs e) { Item newItem = new Item(); newItem.id = this.uid.Text; newItem.price = Int32.Parse(this.uprice.Text); newItem.Catagory = this.ucatagory.Text; newItem.size = Int32.Parse(this.usize.Text); newItem.color = this.ucolor.Text; newItem.brand = this.ubrand.Text; newItem.date = this.udpDate.SelectedDate.Value.Date; PLayer toUpdate = new PLayer(); int count = toUpdate.updateItem(newItem); if (count > 0) { uStatus.Content = "Item Updated"; this.uid.Text = ""; this.uprice.Text = ""; this.ucatagory.Text = ""; this.usize.Text = ""; this.ucolor.Text = ""; this.ubrand.Text = ""; this.udpDate.SelectedDate = DateTime.Today; } else { uStatus.Content = "No Item Updated..."; this.uid.Text = ""; this.uprice.Text = ""; this.ucatagory.Text = ""; this.usize.Text = ""; this.ucolor.Text = ""; this.ubrand.Text = ""; this.udpDate.SelectedDate = DateTime.Today; } }