Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
not sure how to write the code for this. i have two forms, one is the main form which has a listbox containing data which is loaded in from a text file. the other is a delivery form. when the user select an item in the list box and click the edit button, the delivery form should appear with the selected data displayed in the text box of the delivery form at the moment i have something like this


private Visit theVisit = new Visit();
private List<Delivery> deliveries = new List<Delivery>();
private FrmDelivery deliveryForm = new FrmDelivery();

private void updateDelivery()
{
lstDeliveries.Items.Clear();
List<String> listOfD = theVisit.listDeliveries();
lstDeliveries.Items.AddRange(listOfD.ToArray());
}
private void btnEditDelivery_Click(object sender, EventArgs e)
{
deliveryForm.ShowDialog();
updateDelivery();
}

Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900