internal bool AddFirm(CreateFirmRequest request) { var conn = GetConnection(ConnectionNames.CSPSqlDatabase); var commandWrapper = GetStoredProcCommand("dbo.Insert_Firm", conn); AddInParameter(commandWrapper, "@FirmName", DbType.String, request.Firm.FirmName); AddInParameter(commandWrapper, "@ERROR", DbType.String, 1000); AddInParameter(commandWrapper, "@ERROR_CODE", DbType.String, 4); try { conn.Open(); int results = commandWrapper.ExecuteNonQuery(); var isProcedureSucced = Convert.ToBoolean(results); MakeDboLog(request.ToString(), isProcedureSucced.ToString(), "dbo.Insert_Firm"); var errorObject = GetParameterValue(commandWrapper, "@ERROR"); var errorCodeObject = GetParameterValue(commandWrapper, "@ERROR_CODE"); return(Convert.ToBoolean(results)); } finally { commandWrapper.Dispose(); conn.Close(); } }