public void SaveNonNorthAmericanCSM(string manufacturer, string platform, string program, string nameplate, out string errorMessage) { errorMessage = ""; var result = new ObjectParameter("Result", typeof(Int32)); var tranDt = new ObjectParameter("TranDT", typeof(DateTime)); try // Tie new Non-North American CSM record to quote, or update existing record { _context.usp_QT_InsertQuoteManualProgramData(_quoteNumber, manufacturer, platform, program, nameplate, tranDt, result); } catch (Exception ex) { errorMessage = "Failed to save Non-North American CSM data."; //if (ex.InnerException != null) MessageBox.Show(ex.InnerException.ToString().Remove(ex.InnerException.ToString().IndexOf("at System.")), "Error"); } }