Exemple #1
0
        protected override void SendAddtionalNotification()
        {
            string[] p = new string[] { };

            foreach (DataRow row in nc.GetDataTable("tbl").Rows)
            {
                if (!p.Contains(row["配合人"].ToString()))
                {
                    Array.Resize(ref p, p.Length + 1);
                    p.SetValue(row["配合人"].ToString(), p.Length - 1);
                }
                else
                {
                    continue;
                }

                nc.GetDataTable("tbl").DefaultView.RowFilter = " 配合人='" + row["配合人"].ToString() + "'";

                NotificationContent msg = new NotificationContent();
                msg.subject = this.subject;
                msg.AddTo("C0160" + "@hanbell.com.cn");
                msg.content = GetContent(nc.GetDataTable("tbl").DefaultView.ToTable(), null);
                msg.AddNotify(new MailNotify());
                msg.Update();
            }
        }
        protected override void SendAddtionalNotification()
        {
            string[] title  = { "项目编号", "采购单号", "厂商编号", "厂商简称", "内容", "物料件号", "数量", "负责人", "姓名", "交货日期", "邮箱" };
            int[]    width  = { 80, 80, 80, 120, 160, 140, 45, 50, 60, 70, 160 };
            string[] optstr = new string[] { };
            foreach (DataRow item in this.nc.GetDataTable("tblcdrspec").Rows)
            {
                if (optstr.Contains(item["vdrno"].ToString()))
                {
                    continue;                                           //跳出重复值
                }
                Array.Resize(ref optstr, optstr.Length + 1);
                optstr.SetValue(item["vdrno"].ToString(), optstr.Length - 1);

                this.nc.GetDataTable("tblcdrspec").DefaultView.RowFilter = "vdrno='" + item["vdrno"].ToString() + "'";

                if (item["email"].ToString() != "")
                {
                    NotificationContent msg = new NotificationContent();
                    msg.content = GetContent(nc.GetDataTable("tblcdrspec").DefaultView.ToTable(), title, width);
                    msg.subject = this.subject;
                    msg.AddTo(item["email"].ToString());
                    msg.cc = this.cc;
                    msg.AddNotify(new MailNotify());
                    msg.Update();
                    msg.Dispose();
                }
            }
        }
        protected override void SendAddtionalNotification()
        {
            string[] title = { "案件代號", "維修單別", "維修單號", "維修序號", "客戶代號", "客戶全名", "產品品號", "產品品名", "產品規格", "送修", "送修部门", "维修人员", "维修部门", "产品序号", "产品别", "区域别", "需核銷", "已核銷", "強制結案", "部門代號", "ERP服務領料單號", "ERP服務退料單號", "ERP借出單號", "ERP歸還單號", "品號", "品名", "實領數量" };
            int[]    width = { 150, 50, 150, 30, 100, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 50 };
            string[] depts = new string[] { };
            foreach (DataRow item in this.nc.GetDataTable("CRM_WeiTuiWuLiao").Rows)
            {
                if (depts.Contains(item["TC017"].ToString()))
                {
                    continue;                                        //跳出重复值
                }
                Array.Resize(ref depts, depts.Length + 1);
                depts.SetValue(item["TC017"].ToString(), depts.Length - 1);
                this.nc.GetDataTable("CRM_WeiTuiWuLiao").DefaultView.RowFilter = "TC017='" + item["TC017"].ToString() + "'";

                NotificationContent msg = new NotificationContent();
                msg.content = GetContent(nc.GetDataTable("CRM_WeiTuiWuLiao").DefaultView.ToTable(), title, width);
                msg.subject = this.subject;
                msg.AddTo(item["TC017"].ToString() + "@hanbell.com.cn");
                msg.AddCc(GetManagerIdByDeptIdFromOA(item["TC017"].ToString().Substring(0, 2)) + "@hanbell.com.cn"); //抄送给部门主管
                msg.AddCc("C0201" + "@" + Base.GetMailAccountDomain());                                              //抄送陈海英
                msg.AddCc("C0005" + "@" + Base.GetMailAccountDomain());                                              //抄送余丽萍
                msg.AddNotify(new MailNotify());
                msg.Update();
                msg.Dispose();
            }
        }
Exemple #4
0
 protected override void SendAddtionalNotification()
 {
     string[] title = { "录入人员", "人员姓名", "责任部门", "部门简称", "区域别", "产品别", "案件编号", "客户代号", "客户简称", "产品序号", "客诉类别", "责任判定", "是否客诉", "收费否", "是否在原厂保固期", "问题描述", "接案日期", "原因分析说明", "结案码", "结案日期" };
     int[]    width = { 80, 80, 80, 80, 120, 120, 120, 80, 80, 80, 80, 80, 80, 80, 80, 100, 80, 80, 80, 80 };
     this.content = GetContent(nc.GetDataTable("tlbGuest"), title, width);
     string[] optstr = new string[] { };
     foreach (DataRow item in this.nc.GetDataTable("tlbGuest").Rows)
     {
         if (optstr.Contains(item["CREATOR"].ToString()))
         {
             continue;                                             //跳出重复值
         }
         Array.Resize(ref optstr, optstr.Length + 1);
         optstr.SetValue(item["CREATOR"].ToString(), optstr.Length - 1);
         this.nc.GetDataTable("tlbGuest").DefaultView.RowFilter = "CREATOR='" + item["CREATOR"].ToString() + "'";
         NotificationContent msg = new NotificationContent();
         msg.content = GetContent(nc.GetDataTable("tlbGuest").DefaultView.ToTable(), title, width);
         msg.subject = this.subject;
         String bb = item["CREATOR"].ToString().Trim() + "@" + Base.GetMailAccountDomain();
         msg.AddTo(item["CREATOR"].ToString() + "@" + Base.GetMailAccountDomain());
         //msg.AddTo("C1749" + "@" + Base.GetMailAccountDomain());
         String deptno = item["BQ017"].ToString().Substring(0, 2) + "000";
         msg.AddCc(GetManagerOIDByDeptnoFromOA(deptno) + "@" + Base.GetMailAccountDomain());
         msg.AddCc(GetManagerIdByEmployeeIdFromOA(item["CREATOR"].ToString().Trim()) + "@" + Base.GetMailAccountDomain());
         msg.AddCc("C0201" + "@" + Base.GetMailAccountDomain());
         msg.AddCc("C0005" + "@" + Base.GetMailAccountDomain());
         msg.AddNotify(new MailNotify());
         msg.Update();
         msg.Dispose();
     }
 }
Exemple #5
0
        protected override void SendAddtionalNotification()
        {
            Hashtable args = new Hashtable();

            args = Base.GetParameter(this.ToString(), nc.ToString());
            string mailcc;
            int    day1, day2, day3, day4, day5;

            if (args == null || args.Count != 5)
            {
                day1 = 1; day2 = 2; day3 = 3; day4 = 4; day5 = 5;
            }
            else
            {
                day1 = int.Parse(args["day1"].ToString());
                day2 = day1 + int.Parse(args["day2"].ToString());
                day3 = day2 + int.Parse(args["day3"].ToString());
                day4 = day3 + int.Parse(args["day4"].ToString());
                day5 = day4 + int.Parse(args["day5"].ToString());
            }
            string[] title = new string[] { "产品", "区域", "客户代码", "客户简称", "业务", "姓名", "未逾期", "逾期款", "本月到期", "逾期" + day1 + "月",
                                            "逾期" + day2 + "月", "逾期" + day3 + "月", "逾期" + day4 + "月", "逾期" + day5 + "月", "超过" + day5 + "月", "账款合计", "本月应收", "逾期应收", "本月总应收" };
            int[]    width = new int[] { 40, 40, 70, 80, 60, 60, 80, 80, 80, 80, 80, 80, 80, 80, 80, 90, 80, 80, 80 };
            string[] p     = new string[] { };

            foreach (DataRow row in nc.GetDataTable("tblresult").Rows)
            {
                if (p.Contains(row["userno"].ToString()))
                {
                    continue;
                }
                Array.Resize(ref p, p.Length + 1);
                p.SetValue(row["userno"].ToString(), p.Length - 1);

                nc.GetDataTable("tblresult").DefaultView.RowFilter = " userno='" + row["userno"].ToString() + "'";

                NotificationContent msg = new NotificationContent();
                msg.AddTo(GetMailAddressByEmployeeIdFromOA(row["userno"].ToString()));
                //抄送直接主管
                mailcc = GetManagerIdByEmployeeIdFromOA(row["userno"].ToString());

                if (mailcc != null && mailcc.ToString() != "")
                {
                    msg.AddCc(GetMailAddressByEmployeeIdFromOA(mailcc));
                    //获取上上级主管,如果是华东晋能龙经理,就抄送给他
                    mailcc = GetManagerIdByEmployeeIdFromOA(mailcc);
                    if (mailcc != null && mailcc.ToString() == "C0045")
                    {
                        msg.AddCc(GetMailAddressByEmployeeIdFromOA(mailcc));
                    }
                }
                msg.subject = this.subject;
                msg.content = GetContent(nc.GetDataTable("tblresult").DefaultView.ToTable(), title, width);
                msg.AddNotify(new MailNotify());
                msg.Update();
                msg.Dispose();
            }
        }
Exemple #6
0
        protected override void SendAddtionalNotification()
        {
            string dept = null;

            String[] title = { "通报编号", "主题", "距有效日期剩余天数", "分发部门" };
            int[]    width = { 100, 100, 100, 100 };
            string   table;
            string   deptno = "";

            //OA表单的集合 ->
            foreach (DataRow row in nc.GetDataTable("tbl").Rows)
            {
                //找到每一张表单上的部门
                dept = "";
                dept = row["depat"].ToString();
                //按分号拆分部门
                String[] arrDept = dept.Replace("\n", "").Trim().Split(';');

                nc.GetDataTable("tbl").DefaultView.RowFilter = " canu='" + row["canu"].ToString() + "'";
                if (arrDept != null)
                {
                    foreach (string item in arrDept)
                    {
                        NotificationContent msg = new NotificationContent();
                        //截取部门代号
                        if (item != "" && item != null)
                        {
                            deptno = item != "" ? item.Substring(0, 5) : "";
                            //直接发送
                            if (deptno != "" && deptno != null)
                            {
                                msg.AddTo(GetMailAddressByDeptIdFromOA(deptno));
                                // string aaa = GetMailAddressByDeptIdFromOA(deptno);
                                //  msg.AddTo("*****@*****.**");
                            }
                            msg.subject = this.subject;
                            table       = GetHTMLTable(nc.GetDataTable("tbl").DefaultView.ToTable(), title, width);
                            msg.content = GetContentHead() + table + GetContentFooter();
                            msg.AddNotify(new MailNotify());
                            msg.Update();
                            msg.Dispose();
                        }
                    }
                }
            }
        }
Exemple #7
0
        protected override void SendAddtionalNotification()
        {
            //base.SendAddtionalNotification();
            //string title = nc.GetQueryString(DBServerType.MSSQL, Base.GetDBConnectionString("EFGP"), "sql");
            string managerId;
            string headperson;
            string table1;

            string[] p = new string[] { };

            String[] title = { "借出单号", "对象类别", "借出对象", "借出对象名称", "借出部门", "借出部门名称", "负责人", "负责人姓名", "借出日期", "预计归还日期", "品号", "品名", "借出数量", "归还数量", "未归还数量", "单位", "逾期天数" };
            int[]    width = { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 50, 50, 50, 50, 50 };
            foreach (DataRow row in nc.GetDataTable("tlb").Rows)
            {
                if (!p.Contains(row["headperson"].ToString()))
                {
                    Array.Resize(ref p, p.Length + 1);
                    p.SetValue(row["headperson"].ToString(), p.Length - 1);
                }
                table1 = GetHTMLTable(nc.GetDataTable("tlb").DefaultView.ToTable(), title, width);
                NotificationContent msg = new NotificationContent();
                headperson = row["headperson"].ToString();
                //headperson = "C1749";
                if (headperson != "" && headperson != null)
                {
                    msg.AddTo(GetMailAddressByEmployeeIdFromOA(headperson));
                }
                ////抄送直属主管
                //managerId = GetManagerIdByEmployeeIdFromOA(headperson);
                //if (managerId.ToString() != "" && !managerId.ToString().Equals("C0616"))
                //{
                //    msg.AddCc(GetMailAddressByEmployeeIdFromOA(managerId));
                //}
                msg.subject = this.subject;
                msg.content = GetContentHead() + table1 + GetContentFooter();
                msg.AddNotify(new MailNotify());
                msg.Update();
                msg.Dispose();
            }
        }
Exemple #8
0
        protected override void SendAddtionalNotification()
        {
            Hashtable args = new Hashtable();

            args = Base.GetParameter(this.ToString(), nc.ToString());
            //string mailcc;

            string[] title = new string[] { "部门代号", "部门名称", "服务结案单单号", "服务单号", "客服单号", "处理责任人工号", "处理责任人姓名", "单据年/月" };
            int[]    width = new int[] { 150, 150, 200, 200, 200, 150, 150, 150 };
            string[] p     = new string[] { };

            foreach (DataRow row in nc.GetDataTable("tblresult").Rows)
            {
                if (p.Contains(row["resdd007"].ToString()))
                {
                    continue;
                }
                Array.Resize(ref p, p.Length + 1);
                p.SetValue(row["resdd007"].ToString(), p.Length - 1);

                nc.GetDataTable("tblresult").DefaultView.RowFilter = " resdd007='" + row["resdd007"].ToString() + "'";

                NotificationContent msg = new NotificationContent();

                msg.AddTo(row["resdd007"].ToString() + "@" + Base.GetMailAccountDomain());
                //mailcc = GetManagerIdByEmployeeIdFromOA(row["resdd007"].ToString());
                //if (mailcc.ToString() != "")
                //{
                //    mailcc = mailcc + "@" + Base.GetMailAccountDomain();
                //    msg.AddCc(mailcc);
                //}
                //msg.cc = this.cc;
                msg.subject = this.subject;
                msg.content = GetContent(nc.GetDataTable("tblresult").DefaultView.ToTable(), title, width);
                msg.AddNotify(new MailNotify());
                msg.Update();
                msg.Dispose();
            }
        }
Exemple #9
0
        protected override void SendAddtionalNotification()
        {
            string table;

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

            string[] title = { "申请单号", "申请日期", "输入日期", "申请部门", "部门名称", "部门名称预算中心", "预算中心", "预算中心名称", "申请人员", "申请人员姓名", "输入人员", "输入人员姓名", "申请内容", "借货交易类别", "单价", "数量", "币别", "汇率", "费用金额", "预算科目", "科目名称" };
            int[]    width = { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 60, 60, 60, 60, 60, 60, 60, 100 };

            foreach (DataRow row in nc.GetDataTable("tlbpayment").Rows)
            {
                if (!p.Contains(row["apusrno"].ToString()))
                {
                    Array.Resize(ref p, p.Length + 1);
                    p.SetValue(row["apusrno"].ToString(), p.Length - 1);
                    msg.AddTo(GetMailAddressByEmployeeIdFromOA(row["apusrno"].ToString()));
                    //msg.AddTo(GetMailAddressByEmployeeIdFromOA("C1749"));
                }
                if (row["apusrno"].ToString() != "" && row["apusrno"].ToString().Equals("C0002"))
                {
                    msg.AddCc("*****@*****.**");
                    //msg.AddCc("*****@*****.**");
                }
            }
            table = GetHTMLTable(nc.GetDataTable("tlbpayment").DefaultView.ToTable(), title, width);
            if (nc.GetDataTable("tlbpayment").DefaultView.ToTable().Rows.Count > 0)
            {
                table = "以下是跨部门请款明细表,请核对 <br/>" + table;
            }
            msg.subject = this.subject;
            msg.content = GetContentHead() + table + GetContentFooter();
            msg.AddNotify(new MailNotify());
            msg.Update();
            msg.Dispose();
        }
Exemple #10
0
        protected override void SendAddtionalNotification()
        {
            string table1;

            string[] p = new string[] { };

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

                if (nc.GetDataTable("tbresult").DefaultView.ToTable().Rows.Count > 0)
                {
                    table1 = "以下采购单未交货明细汇总表<br/>" + table1;
                }



                NotificationContent msg = new NotificationContent();
                msg.AddTo(GetMailAddressByEmployeeIdFromOA(row["userno"].ToString()));
                //msg.AddCc(GetMailAddressByEmployeeIdFromOA(row["buyer"].ToString()));
                //string str1 = "</br>" + userno;
                //msg.AddCc(GetMailAddressByEmployeeIdFromOA("C1491"));
                msg.subject = this.subject;
                msg.content = GetContentHead() + table1 + GetContentFooter();
                msg.AddNotify(new MailNotify());
                msg.Update();
                msg.Dispose();
            }
        }
Exemple #11
0
        protected override void SendAddtionalNotification()
        {
            string[] title  = { "客户编号", "客户简称", "业务", "姓名", "客户单号", "订单", "机型", "品名", "数量", "交货日期", "已入库", "已出货", "制令", "组装日期", "入库日期" };
            int[]    width  = { 80, 100, 60, 60, 150, 100, 120, 160, 50, 80, 60, 60, 120, 80, 80 };
            string[] optstr = new string[] { };
            foreach (DataRow item in this.nc.GetDataTable("tblresult").Rows)
            {
                if (optstr.Contains(item["mancode"].ToString()))
                {
                    continue;                                             //跳出重复值
                }
                Array.Resize(ref optstr, optstr.Length + 1);
                optstr.SetValue(item["mancode"].ToString(), optstr.Length - 1);
                this.nc.GetDataTable("tblresult").DefaultView.RowFilter = "mancode='" + item["mancode"].ToString() + "'";

                NotificationContent msg = new NotificationContent();
                msg.content = GetContent(nc.GetDataTable("tblresult").DefaultView.ToTable(), title, width);
                msg.subject = this.subject;
                msg.AddTo(item["mancode"].ToString() + "@" + Base.GetMailAccountDomain());
                msg.AddNotify(new MailNotify());
                msg.Update();
                msg.Dispose();
            }
        }
        protected override void SendAddtionalNotification()
        {
            string managerId;
            string table1, table2;

            string[]  p = new string[] { };
            DataTable tbl;

            foreach (DataRow row in nc.GetDataTable("tblprocess1").Rows)
            {
                if (row["id"].ToString().Substring(0, 1).Equals("H") || row["id"].ToString().Substring(0, 1).Equals("Q"))
                {
                    continue;
                }
                if (p.Contains(row["id"].ToString()))
                {
                    continue;
                }
                Array.Resize(ref p, p.Length + 1);
                p.SetValue(row["id"].ToString(), p.Length - 1);
                nc.GetDataTable("tblprocess1").DefaultView.RowFilter = " id='" + row["id"].ToString() + "'";
                tbl = nc.GetDataTable("tblprocess1").DefaultView.ToTable();
                tbl.Columns.Remove("deptno");
                tbl.Columns.Remove("dept");
                table1 = GetHTMLTable(tbl, null, null);

                nc.GetDataTable("tblprocess1").DefaultView.RowFilter = " id='" + row["id"].ToString() + "' AND delaydays > 2 ";
                tbl = nc.GetDataTable("tblprocess1").DefaultView.ToTable();
                tbl.Columns.Remove("deptno");
                tbl.Columns.Remove("dept");
                if (tbl.Rows.Count > 0)
                {
                    table2 = "以下单据已超过2天,请向主管说明原因!<br/>" + GetHTMLTable(tbl, null, null);
                }
                else
                {
                    table2 = "没有超过2天及以上的未签核单据";
                }


                NotificationContent msg = new NotificationContent();
                //msg.AddTo("*****@*****.**");
                string useradd = GetMailAddressByEmployeeIdFromOA(row["id"].ToString());
                if (String.IsNullOrEmpty(useradd))
                {
                    continue;
                }
                msg.AddTo(useradd);
                if (tbl.Rows.Count > 0)
                {
                    //抄送直属主管
                    managerId = GetManagerIdByEmployeeIdFromOA(row["id"].ToString());
                    string usermanageradd = GetMailAddressByEmployeeIdFromOA(managerId);
                    if (!String.IsNullOrEmpty(usermanageradd))
                    {
                        msg.AddCc(usermanageradd);
                    }

                    // msg.AddBcc("*****@*****.**");
                }

                msg.subject = row["deptno"].ToString() + row["dept"].ToString() + "_" + this.subject;
                msg.content = GetContentHead() + table1 + "<br/><br/><br/>" + table2 + GetContentFooter();
                msg.AddNotify(new MailNotify());
                msg.Update();
                msg.Dispose();
            }
        }