private void button12_Click(object sender, EventArgs e) { UpBusinessRule rule = new UpBusinessRule(); rule.Buy(); rule.Sale(); label2.Text = "交易完成"; }
private void button2_Click(object sender, EventArgs e) { label1.Text = "交易中"; UpBusinessRule rule = new UpBusinessRule(); var Stocks = rule.Sale(); foreach (var s in Stocks) { //輸入資料 ListViewItem item = new ListViewItem(s.Id + s.Name); //ID listView1.Items.Add(item); } label1.Text = "交易完成"; }
private void button3_Click(object sender, EventArgs e) { label1.Text = "交易中"; UpBusinessRule rule = new UpBusinessRule(); DateTime start = new DateTime(2018, 2, 22); DateTime end = System.DateTime.Now; while (start < end) { rule.Buy(start); rule.Sale(start); start = start.AddDays(1); } label1.Text = "交易完成"; }