public void validate_Click(object sender, EventArgs e) { stockFileName = DateTime.Now.ToString("dd-MMMM-yy hh.mm") + ".xml"; stockloader.save(stock, stockFileName); orderDetails.Rows.Clear(); }