private void buttonSearchOrder_Click(object sender, EventArgs e) { Order Or = OrdersDA.SearchN(Convert.ToInt32(textBoxOrderSearcher.Text)); if (Or != null) { textBoxOrderNumber.Text = Or.OrdernUmber.ToString(); dateTimePickerOrder.Text = Or.OrderDate; dateTimePickerShipping.Text = Or.ShippingDate; textBoxclientname.Text = Or.ClientNumber; textBoxbooktitle.Text = Or.BookName; textBoxOrderQuantity.Text = Or.Quantity.ToString(); textBoxUnitPrice.Text = Or.unit.ToString(); textBoxSubtotal.Text = Or.Subtotal.ToString(); textBoxGST.Text = Or.Gst.ToString(); textBoxPST.Text = Or.Pst.ToString(); textBoxtotal.Text = Or.total.ToString(); textBoxOrderSearcher.Clear(); } else { MessageBox.Show("User not Found!"); textBoxOrderSearcher.Clear(); textBoxOrderSearcher.Focus(); } }