示例#1
0
        protected override void SendAddtionalNotification()
        {
            string table1;

            string[]            p   = new string[] { };
            string[]            d   = new string[] { };
            NotificationContent msg = new NotificationContent();

            foreach (DataRow row in nc.GetDataTable("tbresult").Rows)
            {
                if (!p.Contains(row["userno"].ToString()))
                {
                    Array.Resize(ref p, p.Length + 1);
                    p.SetValue(row["userno"].ToString(), p.Length - 1);
                    //string userno = row["userno"].ToString();
                    msg.AddTo(GetMailAddressByEmployeeIdFromOA(row["userno"].ToString()));
                }
            }
            table1 = GetHTMLTable(nc.GetDataTable("tbresult").DefaultView.ToTable(), null, null);

            if (nc.GetDataTable("tbresult").DefaultView.ToTable().Rows.Count > 0)
            {
                table1 = "以下已点收GB 物料 ,请技术人员配合检验 <br/>" + table1;
            }
            msg.AddCc("*****@*****.**");
            msg.AddCc("*****@*****.**");
            msg.AddCc("*****@*****.**");
            msg.AddCc("*****@*****.**");
            msg.AddBcc("*****@*****.**");
            msg.subject = this.subject;
            msg.content = GetContentHead() + table1 + GetContentFooter();
            msg.AddNotify(new MailNotify());
            msg.Update();
            msg.Dispose();
        }