private void ClickConfirm(object sender, EventArgs e) { if (DateBox.Text != "") { _sale.Sale_Date = Convert.ToDateTime(DateBox.Text); } if (CostBox.Text != "") { _sale.Total_Cost = double.Parse(CostBox.Text); } if (NameBox.Text != "") { _sale.Customer_Name = NameBox.Text; } _PHPRepo.EditSalesRecord(_sale); SaleTable.Items.Clear(); _sale = _PHPRepo.GetSaleById(SaleID); AddSaleToTable(_sale); InitialiseTextBoxes(); SaleIDtext.Clear(); }