private void DeliveryMenuItem_Click(object sender, EventArgs e) { DeliveryForm deliveryForm = new DeliveryForm((sender as ToolStripItem).Name); deliveryForm.ShowDialog(); LoadDeliveries(); }
private void NewDeliveryToolStripMenuItem_Click(object sender, EventArgs e) { DataBase db = DataBase.GetInstance; string deliveryCode = FindDeliveryCode(); db.CreateDelivery("Nowa dostawa", deliveryCode, DateTime.Today.ToShortDateString()); db.GetDeliveries(); DeliveryForm deliveryForm = new DeliveryForm(deliveryCode); deliveryForm.ShowDialog(); LoadDeliveries(); }