Ejemplo n.º 1
0
        public void WriteCandidateCsv()
        {
            DataTable csv = Item.CreateBlankTable();

            foreach (var item in _profitCandidates)
            {
                DataRow dr = csv.NewRow();
                dr[0] = item.Code;
                dr[1] = item.ItemName;
                dr[2] = item.MercariPrice;
                dr[3] = item.MercariUrl;
                dr[4] = item.SaiyasuneNewPrice;
                dr[5] = item.SaiyasuneOldPrice;
                dr[6] = item.SaiyasuneUrl;
                dr[7] = item.Profit();
                csv.Rows.Add(dr);
            }
            csv.AcceptChanges();
            var csvUtil = new CSVUtil();

            csvUtil.WriteCsv(csv, @".\購入候補_" + DateTime.Now.ToString("yyyyMMddHHmm") + ".csv", true);
        }