Browse Source

发送邮件修改

master
yangtm 3 weeks ago
parent
commit
99b73664cd
  1. 9
      ICSSoft.FromERP/ICSSoft.FromERP/ICSWHSendMail.cs
  2. 6
      ICSSoft.FromERP/ICSSoft.Test/Program.cs

9
ICSSoft.FromERP/ICSSoft.FromERP/ICSWHSendMail.cs

@ -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 发邮件

6
ICSSoft.FromERP/ICSSoft.Test/Program.cs

@ -25,8 +25,10 @@ namespace ICSSoft.Test
//ICSWareHouseLotInfoDoc test = new ICSWareHouseLotInfoDoc();
//test.Execute();
ICSTransferAuto test = new ICSTransferAuto();
test.Execute();
ICSWHSendMail test = new ICSWHSendMail();
test.Execute("WHSendMail");
test.Execute("WHSendMail109");
}

Loading…
Cancel
Save