watchfenbi.cs

来自「股票价格预警,股票价格预警,股票价格预警」· CS 代码 · 共 66 行

CS
66
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class WatchFenBi : Form
    {
        public WatchFenBi()
        {
            InitializeComponent();

        }

        private void btWatch_Click(object sender, EventArgs e)
        {            
            //timer1.Enabled = true;
            //timer1.Interval = 300000;


            if (chk_A.Checked == true)
            {
                string sql = "select * from DQ_上海板块 ";
                DataSet ds = db.GetDataSetFB(sql);

                string stock_code = "select fullCode from type_blockcode where typeName='上海板块'";
                DataSet ds_stock = db.GetDataSet(stock_code);
                DataRow[] foundRows;


                foreach (DataRow dr in ds_stock.Tables[0].Rows)
                {
                    string select = "fullCode='" + dr["fullCode"].ToString() + "' and stockTime>'2008-10-14 14:50:00.000' and  stockTime<'2008-10-14 15:00:00.000' ";

                    foundRows = ds.Tables[0].Select(select);

                    int count = 0;
                    foreach (DataRow drf in foundRows)
                    {
                        if (drf["isBuy"].ToString() == "1")
                        {
                            count++;
                        }
                    }

                    if (count > 20)
                    {
                        txtFound.AppendText(dr["fullCode"].ToString());
                    }

                }
            }
        }

        DBClass db = new DBClass();

        private void timer1_Tick(object sender, EventArgs e)
        {
            
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?