//private void MainScreenDos_FormClosing(object sender, FormClosingEventArgs e) //{ // if (e.CloseReason == CloseReason.UserClosing) // { // DialogResult result = MessageBox.Show("Do you really want to exit?", "Exit Application", MessageBoxButtons.YesNo); // if (result == DialogResult.Yes) // { // Environment.Exit(0); // } // else // e.Cancel = true; // } // else // e.Cancel = true; //} private void btnAddIR_Click(object sender, EventArgs e) { TicketTemplate pr = new TicketTemplate("ticket item repair", categoryID, ticketItemID); //nono we need the categoryID to be sent pr.FormClosed += PR_FormClosedIRL; pr.Show(); }
private void btnAddTI_Click(object sender, EventArgs e) { TicketTemplate pr = new TicketTemplate("ticket item", ticketID, dropDate); pr.FormClosed += PR_FormClosedTIL; pr.Show(); }
private void btnAddTicket_Click(object sender, EventArgs e) { GetMaxTicketNum(); //TicketTemplate pr; //look into disposeasync?? Or do the populateCTV asynchronously?? //https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-disposeasync //using (pr = new TicketTemplate(custName, "ticket", ticketNumber, customerID)) //{ // pr.Show(); //} //if(pr.IsDisposed) // PopulateCTV(); TicketTemplate tt = new TicketTemplate(custName, "ticket", ticketNumber, customerID); tt.FormClosed += TT_FormClosed; tt.Show(); }