private void BtnSearch_Click(object sender, EventArgs e)
        {
            TwseTradingExchangeFunc func = new TwseTradingExchangeFunc();
            DateTime dt = Dtp.Value.ConvertToYmd();
            int      n  = Convert.ToInt32(Nud.Value);

            Dgv.DataSource = func.GetPeRatioTopN(dt, n);
        }
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            TwseTradingExchangeFunc func = new TwseTradingExchangeFunc();
            string id  = TbSID.Text;
            int    day = Convert.ToInt32(NudDay.Value);

            DgvRecentDay.DataSource = func.GetRecentDay(id, DateTime.Now.ConvertToYmd(), day);
        }
        static void Main()
        {
            TwseTradingExchangeFunc func = new TwseTradingExchangeFunc();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            TwseTradingExchangeFunc func = new TwseTradingExchangeFunc();
            string   id = TbSID.Text;
            DateTime st = DtpStartTime.Value.ConvertToYmd();
            DateTime et = DtpEndTime.Value.ConvertToYmd();

            if (st > et)
            {
                MessageBox.Show("開始時間不可大於結束時間");
                return;
            }
            var data = func.GetYieldRateMaxIncreasingTimeRange(id, st, et);

            LblYieldRateInc.Text       = "最長天數: " + data.Count;
            DgvYieldRateInc.DataSource = data;
        }
示例#5
0
        private void TwseForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            TwseTradingExchangeFunc func = new TwseTradingExchangeFunc();

            func.SaveData();
        }