protected override void Init()
        {
            base.Init();
            nc = new NianDuCaiGouPaiMingConfig_HS(DBServerType.SybaseASE, "HansonERP", this.ToString());
            nc.InitData();
            nc.ConfigData();
            string[]  title = { "年度", "厂商代号", "厂商简称", "上月采购金额(万元)", "上月排名", "年度累计采购金额(万元)", "年度排名", "同期累计采购金额(万元)", "同期排名", "去年总采购金额(万元)", "去年排名", "較去年成長金額", "成长率", "厂商类别" };
            int[]     width = { 80, 150, 150, 100, 70, 150, 70, 200, 70, 150, 70, 100, 60, 120 };
            DataTable dt    = nc.GetDataTable("ndcgpm");

            //获取較去年成長金額
            foreach (DataRow item in dt.Rows)
            {
                item["ly_grow"]   = (Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["lm_puramt"].ToString())).ToString("0.00");
                item["ly_grower"] = ((Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["lm_puramt"].ToString())) / Convert.ToDouble(item["lm_puramt"].ToString())).ToString("0.00%");
            }

            foreach (DataRow item in dt.Rows)
            {
                item["ly_grower"] = "<p align=right>" + item["ly_grower"] + "</p>";
                if (item["ly_grower"].ToString().Contains("-"))
                {
                    item["ly_grower"] = "<font color=red>" + item["ly_grower"] + "</font>";
                }
            }
            //<--2021/1/26增加厂商类别
            dt.Columns.Add("type", System.Type.GetType("System.String")); //插入新列
            DataTable dtType = getVdrType();                              //拿到有厂商类别的dt

            foreach (DataRow item in dt.Rows)
            {
                DataRow[] typeRow = dtType.Select("vdrno='" + item["vdrno"].ToString() + "'");//拿到这个厂商的类型集合
                if (typeRow != null)
                {
                    string[] a    = typeRow.Select(row => row["Name"].ToString()).ToArray(); //DataRow[] 转成 string[]
                    string   type = string.Join(";", a);                                     //转成string字符串
                    item["type"] = type;
                }
            }
            //-->
            dt.AcceptChanges();
            this.content = GetContent(dt, title, width);

            if (nc.GetDataTable("ndcgpm").Rows.Count > 0)
            {
                AddNotify(new MailNotify());
            }
        }
        protected override void Init()
        {
            base.Init();

            nc = new SHBNianDuCaiGouPaiMingConfig(DBServerType.SybaseASE, "SHBERP", this.ToString());
            nc.InitData();
            nc.ConfigData();

            NotificationConfig ncComer = new ComerNainDuCaiGouMaiMingConfig(DBServerType.SybaseASE, "ComerERP", this.ToString());

            ncComer.InitData();
            ncComer.ConfigData();

            NotificationConfig ncHanson = new NianDuCaiGouPaiMingConfig_HS(DBServerType.SybaseASE, "HansonERP", this.ToString());

            ncHanson.InitData();
            ncHanson.ConfigData();

            string[]  title = { "年度", "厂商代号", "厂商简称", "上月采购金额(万元)", "上月排名", "年度累计采购金额(万元)", "年度排名", "同期累计采购金额(万元)", "同期排名", "去年总采购金额(万元)", "去年排名", "較去年成長金額", "成长率", "厂商类别" };
            int[]     width = { 80, 150, 150, 100, 70, 150, 70, 200, 70, 150, 70, 100, 60, 120 };
            DataTable dt1   = nc.GetDataTable("ndcgpm");
            DataTable dt2   = ncComer.GetDataTable("ndcgpm");
            DataTable dt3   = ncHanson.GetDataTable("ndcgpm");

            //获取較去年成長金額
            foreach (DataRow item in dt1.Rows)
            {
                item["ly_grow"]   = (Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["lm_puramt"].ToString())).ToString("0.00");
                item["ly_grower"] = ((Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["lm_puramt"].ToString())) / Convert.ToDouble(item["lm_puramt"].ToString())).ToString("0.00%");
            }

            foreach (DataRow item in dt1.Rows)
            {
                item["ly_grower"] = "<p align=right>" + item["ly_grower"] + "</p>";
                if (item["ly_grower"].ToString().Contains("-"))
                {
                    item["ly_grower"] = "<font color=red>" + item["ly_grower"] + "</font>";
                }
            }

            foreach (DataRow item in dt2.Rows)
            {
                item["ly_grow"]   = (Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["ly_puramt"].ToString())).ToString("0.00");
                item["ly_grower"] = ((Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["ly_puramt"].ToString())) / Convert.ToDouble(item["lm_puramt"].ToString())).ToString("0.00%");
            }

            foreach (DataRow item in dt2.Rows)
            {
                item["ly_grower"] = "<p align=right>" + item["ly_grower"] + "</p>";
                if (item["ly_grower"].ToString().Contains("-"))
                {
                    item["ly_grower"] = "<font color=red>" + item["ly_grower"] + "</font>";
                }
            }

            foreach (DataRow item in dt3.Rows)
            {
                item["ly_grow"]   = (Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["ly_puramt"].ToString())).ToString("0.00");
                item["ly_grower"] = ((Convert.ToDouble(item["y_puramt"].ToString()) - Convert.ToDouble(item["ly_puramt"].ToString())) / Convert.ToDouble(item["lm_puramt"].ToString())).ToString("0.00%");
            }

            foreach (DataRow item in dt3.Rows)
            {
                item["ly_grower"] = "<p align=right>" + item["ly_grower"] + "</p>";
                if (item["ly_grower"].ToString().Contains("-"))
                {
                    item["ly_grower"] = "<font color=red>" + item["ly_grower"] + "</font>";
                }
            }
            dt1.AcceptChanges();
            dt2.AcceptChanges();
            dt3.AcceptChanges();
            DataTable cdt = addType(dt1, "C");
            DataTable kdt = addType(dt2, "K");
            DataTable hdt = addType(dt3, "H");

            this.content = GetContent(cdt, kdt, hdt, title, width);
            if (nc.GetDataTable("ndcgpm").Rows.Count > 0 && ncComer.GetDataTable("ndcgpm").Rows.Count > 0)
            {
                AddNotify(new MailNotify());
            }
        }