|
|
@ -73,9 +73,9 @@ namespace ICSSoft.FromERP |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Execute() |
|
|
|
public void Execute(string WhCode) |
|
|
|
{ |
|
|
|
log.Info("发送邮件开始……………………………………………………………………"); |
|
|
|
log.Info(WhCode + "发送邮件开始……………………………………………………………………"); |
|
|
|
string sql = ""; |
|
|
|
try |
|
|
|
{ |
|
|
@ -95,8 +95,9 @@ namespace ICSSoft.FromERP |
|
|
|
string sqlMail = @"SELECT b.F_ItemCode, b.F_ItemName, b.F_Define1, b.F_Define2, b.F_Define3, b.F_Define4
|
|
|
|
FROM [dbo].[Sys_SRM_Items] a |
|
|
|
left join [Sys_SRM_ItemsDetail] b on a.f_id = b.f_itemid |
|
|
|
where a.F_EnCode = 'WHSendMail' |
|
|
|
where a.F_EnCode = '{0}' |
|
|
|
order by b.F_SortCode";
|
|
|
|
sqlMail = string.Format(sqlMail, WhCode); |
|
|
|
DataTable mailDt = ICSHelper.ExecuteTable(conStr, sqlMail); |
|
|
|
DataRow[] drs1 = mailDt.Select("F_ItemCode = '001'"); |
|
|
|
DataRow[] drs2 = mailDt.Select("F_ItemCode = '002'"); |
|
|
@ -180,7 +181,7 @@ VALUES (newid(), '{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', |
|
|
|
log.Error(ex.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
log.Info("发送邮件结束……………………………………………………………………"); |
|
|
|
log.Info(WhCode + "发送邮件结束……………………………………………………………………"); |
|
|
|
} |
|
|
|
|
|
|
|
#region 发邮件
|
|
|
|