public static void AddAmazonOrderTran(string accountName, AmazonOrderType amazonOrder) { List <string> sqlList = BuildAddAmazonOrderTranSql(amazonOrder); try { SqlHelper.ExecuteNonQuery(sqlList, ConfigurationManager.AppSettings["marketplace"]); } catch (Exception ex) { ExceptionUtility exceptionUtility = new ExceptionUtility(); exceptionUtility.CatchMethod(ex, accountName + ": AddAmazonOrderTran ", amazonOrder.Header.order_id + ": " + ex.Message.ToString(), senderEmail, messageFromPassword, messageToEmail, smtpClient, smtpPortNum); throw ExceptionUtility.GetCustomizeException(ex); } }
public static List <string> BuildAddAmazonOrderTranSql(AmazonOrderType amazonOrder) { List <string> sqlList = new List <string>(); try { sqlList.Add(BuildAddAmazonOrderHeaderSql(amazonOrder.Header)); foreach (AmazonOrderLineType orderLineType in amazonOrder.Lines) { sqlList.Add(BuildAddAmazonOrderLineSql(orderLineType)); } return(sqlList); } catch (Exception ex) { throw new Exception(ex.Message); } }