public static frmSearchCust CreateInstance() { frmSearchCust theInstance = new frmSearchCust(); theInstance.Form_Load(); return(theInstance); }
private void cbCustomerSearch_Click(Object eventSender, EventArgs eventArgs) { frmSearchCust custSearch = frmSearchCust.CreateInstance(); custSearch.ShowDialog(); if (custSearch.ChosenCustomer > 0) { // Saves the current customer ID and updates its info on the sales screen m_CurrentCustomer = custSearch.ChosenCustomer; LoadCustomerInfo(m_CurrentCustomer); } }