Пример #1
0
        private void RestoreQueryCondition()
        {
            if (this.ViewState["_StockQueryCondition"].ToString() != string.Empty)
            {
                StockQueryCondition qc = new StockQueryCondition();

                qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

                this.txtStockCode.Text         = qc.StockCode;
                this.txtStockName.Text         = qc.StockName;
                this.DatePickerFrom.DateTime   = qc.DatePickerFrom;
                this.DatePickerTo.DateTime     = qc.DatePickerTo;
                this.DatePickerSearch.DateTime = qc.DatePickerSearch;

                for (int i = 0; i < this.DropDownListType.Items.Count; i++)
                {
                    if (this.DropDownListType.Items[i].Value == qc.BuyPoint)
                    {
                        this.DropDownListType.SelectedIndex = i;
                        break;
                    }
                }

                qc.Dispose();
            }
        }
Пример #2
0
        private bool IsValidDate()
        {
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());
            string dateTo = DateTimeFunction.ConvertDate1(qc.DatePickerFrom);

            return(new StockSystem().IsValidDate(dateTo));
        }
Пример #3
0
        private void DrawBlafTableHeader()
        {
            //第一行
            TableRow headerRow = this.BmBlafTableHistory.AddHeadRow();

            headerRow.BorderColor = Color.Black;
            headerRow.BorderWidth = Unit.Point(1);
            headerRow.Height      = 25;

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //股票代码

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //股票名称

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 100).HorizontalAlign = HorizontalAlign.Center; //买入类型

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //查询日期

            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

            _dateList = this.SplitDate(qc.DatePickerFrom, qc.DatePickerTo);

            for (int i = _dateList.Count - 1; i >= 0; i--)
            {
                TableCell cell = this.BmBlafTableHistory.AddHeadCell(headerRow, _dateList[i].ToString(), 70 * 5);
                cell.ColumnSpan      = 5;
                cell.HorizontalAlign = HorizontalAlign.Center;
            }

            //第二行
            TableRow secondRow = this.BmBlafTableHistory.AddHeadRow();

            secondRow.BorderColor = Color.Black;
            secondRow.BorderWidth = Unit.Point(1);

            this.BmBlafTableHistory.AddHeadCell(secondRow, "股票代码", 70).HorizontalAlign = HorizontalAlign.Center;  //股票代码

            this.BmBlafTableHistory.AddHeadCell(secondRow, "股票名称", 70).HorizontalAlign = HorizontalAlign.Center;  //股票名称

            this.BmBlafTableHistory.AddHeadCell(secondRow, "买入类型", 100).HorizontalAlign = HorizontalAlign.Center; //买入类型

            this.BmBlafTableHistory.AddHeadCell(secondRow, "查询日期", 70).HorizontalAlign = HorizontalAlign.Center;  //查询日期

            for (int i = _dateList.Count - 1; i >= 0; i--)
            {
                this.BmBlafTableHistory.AddHeadCell(secondRow, "开盘价", 70).HorizontalAlign = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "收盘价", 70).HorizontalAlign = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "最高价", 70).HorizontalAlign = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "最低价", 70).HorizontalAlign = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "增长率", 70).HorizontalAlign = HorizontalAlign.Center;
            }

            this.BmBlafTableHistory.Width  = "100%";
            this.BmBlafTableHistory.Height = "400";
        }
Пример #4
0
        /// <summary>
        /// 还原界面查询条件
        /// </summary>
        private void RestoreQueryCondition()
        {
            if (this.ViewState["_StockQueryCondition"].ToString() != string.Empty)
            {
                StockQueryCondition qc = new StockQueryCondition();

                qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

                this.txtStockCode.Text       = qc.StockCode;
                this.txtStockName.Text       = qc.StockName;
                this.DatePickerFrom.DateTime = qc.DatePickerFrom;
                this.DatePickerTo.DateTime   = qc.DatePickerTo;

                for (int i = 0; i < this.DropDownListCategory.Items.Count; i++)
                {
                    if (this.DropDownListCategory.Items[i].Value == qc.Market)
                    {
                        this.DropDownListCategory.SelectedIndex = i;
                        break;
                    }
                }

                for (int i = 0; i < this.DropDownListField.Items.Count; i++)
                {
                    if (this.DropDownListField.Items[i].Value == qc.Field)
                    {
                        this.DropDownListField.SelectedIndex = i;
                        break;
                    }
                }

                for (int i = 0; i < this.DropDownListProvince.Items.Count; i++)
                {
                    if (this.DropDownListProvince.Items[i].Value == qc.Province)
                    {
                        this.DropDownListProvince.SelectedIndex = i;
                        break;
                    }
                }

                for (int i = 0; i < this.DropDownListChart.Items.Count; i++)
                {
                    if (this.DropDownListChart.Items[i].Value == qc.Chart)
                    {
                        this.DropDownListChart.SelectedIndex = i;
                        break;
                    }
                }

                qc.Dispose();
            }
        }
Пример #5
0
        /// <summary>
        /// 还原界面查询条件
        /// </summary>
        private void RestoreQueryCondition()
        {
            if (this.ViewState["_StockQueryCondition"].ToString() != string.Empty)
            {
                StockQueryCondition qc = new StockQueryCondition();

                qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

                this.txtStockCode.Text       = qc.StockCode;
                this.DatePickerFrom.DateTime = qc.DatePickerFrom;
                qc.Dispose();
            }
        }
Пример #6
0
        private void Refresh()
        {
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());
            this.labPrompt.Text = "";
            //查询日前两天
            string dateTo2 = new StockSystem().GetIndexDay(qc.DatePickerFrom, 2);

            dateTo2 = DateTimeFunction.ConvertDate(DateTime.Parse(dateTo2).ToShortDateString());
            string date2RSI6 = new StockSystem().GetIndexDay(qc.DatePickerFrom, 8);

            date2RSI6 = DateTimeFunction.ConvertDate(DateTime.Parse(date2RSI6).ToShortDateString());
            string date2RSI12 = new StockSystem().GetIndexDay(qc.DatePickerFrom, 14);

            date2RSI12 = DateTimeFunction.ConvertDate(DateTime.Parse(date2RSI12).ToShortDateString());
            //string date2RSI24 = new StockSystem().GetIndexDay(qc.DatePickerFrom, 26);
            //date2RSI24 = DateTimeFunction.ConvertDate(DateTime.Parse(date2RSI24).ToShortDateString());

            //查询日
            string dateTo   = DateTimeFunction.ConvertDate(qc.DatePickerFrom);
            string dateRSI6 = new StockSystem().GetIndexDay(qc.DatePickerFrom, 6);

            dateRSI6 = DateTimeFunction.ConvertDate(DateTime.Parse(dateRSI6).ToShortDateString());
            string dateRSI12 = new StockSystem().GetIndexDay(qc.DatePickerFrom, 12);

            dateRSI12 = DateTimeFunction.ConvertDate(DateTime.Parse(dateRSI12).ToShortDateString());
            //string dateRSI24 = new StockSystem().GetIndexDay(qc.DatePickerFrom, 24);
            //dateRSI24 = DateTimeFunction.ConvertDate(DateTime.Parse(dateRSI24).ToShortDateString());

            AISTOCK_STOCK_STATS_DATA stockData = new StockSystem().GetStockData(dateTo2, txtStockCode.Text.Trim());
            string today = DateTimeFunction.ConvertDate(DateTime.Now.ToShortDateString());

            today = new StockSystem().GetToday(today);
            bool flag = false;

            if (int.Parse(dateTo) < int.Parse(today))
            {
                flag = true;
            }

            AISTOCK_STOCK_INDEX_V_DATA data2RSI6 = new AISTOCK_STOCK_INDEX_V_DATA();

            data2RSI6 = new StockSystem().GetStockDataIndex(date2RSI6, dateTo2, txtStockCode.Text.Trim());

            this.BmBlafTable.Clear();
            DrawRsiTableHeader();
            DrawRsiTableBody(data2RSI6, stockData, txtStockCode.Text.Trim(), flag, today, dateTo2, date2RSI12, dateTo, dateRSI6, dateRSI12);
        }
Пример #7
0
        private void Refresh()
        {
            if (this.ViewState["_StockQueryCondition"] == null)
            {
                this.RecordQueryCondition();
            }
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

            AISTOCK_STOCK_BASEINFO_DATA data = new StockSystem().GetStockBaseInfo(qc);

            this.BmBlafTableStock.Clear();
            this.DrawBmTableHeader();
            this.DrawBmTableBody(data);
        }
Пример #8
0
        private void Refresh()
        {
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

            string date = DateTimeFunction.ConvertDate(qc.DatePickerFrom);

            AISTOCK_STATS_PERCENT_V_DATA data = new StockSystem().GetStockStatsVData(date);
            DataTable leader = new StockSystem().GetLeaderStock(date);

            this.BmBlafTable.Clear();
            DrawTableHeader();
            DrawTableBody(data, leader);
            this.RestoreQueryCondition();
        }
Пример #9
0
        private void Refresh()
        {
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

            DateTime dateFrom = DateTime.Parse(this.DatePickerFrom.DateTime.ToString());
            DateTime dateTo   = DateTime.Parse(this.DatePickerTo.DateTime.ToString());

            if (dateFrom > dateTo)
            {
                this.RestoreQueryCondition();
                this.labScript.Text = JavaScriptFunction.Alert("选择的查询时间段不对,请重新选择。");
                return;
            }

            AISTOCK_STOCK_DAILY_DATA_V_DATA data = new AISTOCK_STOCK_DAILY_DATA_V_DATA();

            data = new StockSystem().GetStockHistory(qc);
            AISTOCK_STOCK_AVG_PRICE_DATA avgData = new AISTOCK_STOCK_AVG_PRICE_DATA();

            avgData = new StockSystem().GetStockAvgHistory(qc);

            this.BmBlafTableHistory.Clear();
            this.BmBlafTableHistory.IsEnableScroll    = true;
            this.BmBlafTableHistory.FreezeColumnCount = 6;

            if (data == null || data.AISTOCK_STOCK_DAILY_DATA_V.Count <= 0)
            {
                //this.BmBlafTableHistory.TitleRowCount = 1;
                this.DrawBlafTableHeader();
            }
            else
            {
                //this.BmBlafTableHistory.TitleRowCount = 2;
                this.DrawBlafTableHeader();
                this.DrawBlafTableBody(data, avgData);
            }

            //恢复记录
            this.RestoreQueryCondition();
        }
Пример #10
0
        private void Refresh()
        {
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());
            this.labPrompt.Text = "";

            int indexDay = 14;

            if (qc.Index.Equals("RSI(5)"))
            {
                indexDay = 5;
            }
            else if (qc.Index.Equals("RSI(9)"))
            {
                indexDay = 9;
            }
            else if (qc.Index.Equals("RSI(14)") || qc.Index.Equals("ADR(14)"))
            {
                indexDay = 11;
            }
            else if (qc.Index.Equals("WMS(10)") || qc.Index.Equals("ADR(10)"))
            {
                indexDay = 10;
            }
            else if (qc.Index.Equals("WMS(20)"))
            {
                indexDay = 20;
            }

            string dateTo = DateTimeFunction.ConvertDate(qc.DatePickerFrom);

            string date = new StockSystem().GetIndexDay(qc.DatePickerFrom, indexDay);

            date = DateTimeFunction.ConvertDate(DateTime.Parse(date).ToShortDateString());

            AISTOCK_STOCK_STATS_DATA stockData = new StockSystem().GetStockData(dateTo, txtStockCode.Text.Trim());

            if (qc.Index.Equals("RSI(5)") || qc.Index.Equals("RSI(9)") || qc.Index.Equals("RSI(14)"))
            {
                string today = DateTimeFunction.ConvertDate(DateTime.Now.ToShortDateString());
                today = new StockSystem().GetToday(today);
                bool flag = false;
                if (int.Parse(dateTo) < int.Parse(today))
                {
                    flag = true;
                }
                AISTOCK_STOCK_INDEX_V_DATA dataRSI = new AISTOCK_STOCK_INDEX_V_DATA();
                dataRSI = new StockSystem().GetStockDataIndex(date, dateTo, txtStockCode.Text.Trim());

                this.BmBlafTable.Clear();
                DrawRsiTableHeader();
                DrawRsiTableBody(dataRSI, stockData, txtStockCode.Text.Trim(), flag, today, qc.DatePickerFrom, indexDay);
            }
            else if (qc.Index.Equals("WMS(10)") || qc.Index.Equals("WMS(20)"))
            {
                AISTOCK_STOCK_WMS_V_DATA dataWms = new AISTOCK_STOCK_WMS_V_DATA();
                dataWms = new StockSystem().GetStockWmsData(date, dateTo, txtStockCode.Text.Trim());

                this.BmBlafTable.Clear();
                DrawWmsTableHeader();
                DrawWmsTableBody(stockData, dataWms);
            }
            else if (qc.Index.Equals("ADR(10)") || qc.Index.Equals("ADR(14)"))
            {
                AISTOCK_STOCK_ADR_INDEX_V_DATA dataAdr = new AISTOCK_STOCK_ADR_INDEX_V_DATA();
                dataAdr = new StockSystem().GetStockAdrData(date, dateTo, txtStockCode.Text.Trim());

                this.BmBlafTable.Clear();
                DrawAdrTableHeader();
                DrawAdrTableBody(dataAdr);
            }
        }
Пример #11
0
        private void Refresh()
        {
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

            AISTOCK_STOCK_BASEINFO_DATA baseData = new StockSystem().GetStockBaseInfoWithoutCondition();

            int indexDay = 5;

            if (qc.BuyPoint.Equals("低档五连阳"))
            {
                indexDay = 4;
            }
            else if (qc.BuyPoint.Equals("双针探底") || qc.BuyPoint.Equals("锤子线探底"))
            {
                indexDay = 1;
            }
            else if (qc.BuyPoint.Equals("十字星探底"))
            {
                indexDay = 3;
            }
            else if (qc.BuyPoint.Equals("早晨之星"))
            {
                indexDay = 2;
            }

            string dateTo = DateTimeFunction.ConvertDate(qc.DatePickerFrom);
            string date   = new StockSystem().GetIndexDay(qc.DatePickerFrom, indexDay);

            date = DateTimeFunction.ConvertDate(DateTime.Parse(date).ToShortDateString());

            if (qc.BuyPoint.Equals("低档五连阳"))
            {
                AISTOCK_STOCK_LOW_FIVE_V_DATA data = new StockSystem().GetLowFiveData(date, dateTo);
                this.BmBlafTable.Clear();
                DrawLowFiveTableHeader();
                DrawLowFiveTableBody(data, baseData);
            }
            else if (qc.BuyPoint.Equals("双针探底"))
            {
                AISTOCK_STOCK_TWO_PIN_V_DATA data = new StockSystem().GetTwoPinData(date, dateTo);
                this.BmBlafTable.Clear();
                DrawTwoPinTableHeader();
                DrawTwoPinTableBody(data);
            }
            else if (qc.BuyPoint.Equals("十字星探底"))
            {
                AISTOCK_STOCK_SINGLE_PIN_V_DATA data = new StockSystem().GetSinglePinData(date, dateTo);
                this.BmBlafTable.Clear();
                DrawSinglePinTableHeader();
                DrawSinglePinTableBody(data);
            }
            else if (qc.BuyPoint.Equals("锤子线探底"))
            {
                AISTOCK_STOCK_HAMMER_V_DATA data = new StockSystem().GetHammerData(date, dateTo);
                this.BmBlafTable.Clear();
                DrawHammerHeader();
                DrawHammerTableBody(data);
            }
            else if (qc.BuyPoint.Equals("早晨之星"))
            {
                string twoDate = new StockSystem().GetIndexDay(qc.DatePickerFrom, 1);
                twoDate = DateTimeFunction.ConvertDate(DateTime.Parse(twoDate).ToShortDateString());
                AISTOCK_STOCK_MORNING_STAR_V_DATA data = new StockSystem().GetMorningStarData(date, twoDate, dateTo);
                this.BmBlafTable.Clear();
                DrawMorningStarHeader();
                DrawMorningStarTableBody(data);
            }
        }
Пример #12
0
        private void Stats()
        {
            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

            AISTOCK_FIELD_DOMAIN_VALUE_DATA buy = new StockSystem().GetDropDownList("buy");
            int indexDay = 5;

            string dateTo = DateTimeFunction.ConvertDate(qc.DatePickerFrom);
            string date   = string.Empty;

            AISTOCK_STOCK_BUY_STATS_DATA stats    = new AISTOCK_STOCK_BUY_STATS_DATA();
            AISTOCK_STOCK_BASEINFO_DATA  baseData = new StockSystem().GetStockBaseInfoWithoutCondition();

            foreach (AISTOCK_FIELD_DOMAIN_VALUE_DATA.AISTOCK_FIELD_DOMAIN_VALUERow row in buy.AISTOCK_FIELD_DOMAIN_VALUE.Rows)
            {
                string value = row.FIELD_DOMAIN_VALUE;
                if (value.Equals("低档五连阳"))
                {
                    indexDay = 4;
                    date     = new StockSystem().GetIndexDay(qc.DatePickerFrom, indexDay);
                    date     = DateTimeFunction.ConvertDate(DateTime.Parse(date).ToShortDateString());

                    AISTOCK_STOCK_LOW_FIVE_V_DATA data = new StockSystem().GetLowFiveData(date, dateTo);
                    foreach (AISTOCK_STOCK_LOW_FIVE_V_DATA.AISTOCK_STOCK_LOW_FIVE_VRow dataRow in data.AISTOCK_STOCK_LOW_FIVE_V.Rows)
                    {
                        AISTOCK_STOCK_BUY_STATS_DATA.AISTOCK_STOCK_BUY_STATSRow saveRow = stats.AISTOCK_STOCK_BUY_STATS.NewAISTOCK_STOCK_BUY_STATSRow();
                        Guid id = Guid.NewGuid();
                        saveRow.STOCK_BUY_ID = id.ToString().ToUpper();
                        saveRow.STOCK_CODE   = dataRow.STOCK_CODE;
                        DataRow[] tmpRow = baseData.AISTOCK_STOCK_BASEINFO.Select("STOCK_CODE = '" + dataRow.STOCK_CODE + "'");
                        saveRow.STOCK_NAME = ((AISTOCK_STOCK_BASEINFO_DATA.AISTOCK_STOCK_BASEINFORow)tmpRow[0]).STOCK_NAME;
                        saveRow.STOCK_TYPE = "低档五连阳";
                        saveRow.STOCK_DAY  = dateTo;
                        stats.AISTOCK_STOCK_BUY_STATS.AddAISTOCK_STOCK_BUY_STATSRow(saveRow);
                    }
                }
                else if (value.Equals("双针探底"))
                {
                    indexDay = 1;
                    date     = new StockSystem().GetIndexDay(qc.DatePickerFrom, indexDay);
                    date     = DateTimeFunction.ConvertDate(DateTime.Parse(date).ToShortDateString());

                    AISTOCK_STOCK_TWO_PIN_V_DATA data = new StockSystem().GetTwoPinData(date, dateTo);
                    foreach (AISTOCK_STOCK_TWO_PIN_V_DATA.AISTOCK_STOCK_TWO_PIN_VRow dataRow in data.AISTOCK_STOCK_TWO_PIN_V.Rows)
                    {
                        AISTOCK_STOCK_BUY_STATS_DATA.AISTOCK_STOCK_BUY_STATSRow saveRow = stats.AISTOCK_STOCK_BUY_STATS.NewAISTOCK_STOCK_BUY_STATSRow();
                        Guid id = Guid.NewGuid();
                        saveRow.STOCK_BUY_ID = id.ToString().ToUpper();
                        saveRow.STOCK_CODE   = dataRow.STOCK_CODE;
                        saveRow.STOCK_NAME   = dataRow.STOCK_NAME;
                        saveRow.STOCK_TYPE   = "双针探底";
                        saveRow.STOCK_DAY    = dateTo;
                        stats.AISTOCK_STOCK_BUY_STATS.AddAISTOCK_STOCK_BUY_STATSRow(saveRow);
                    }
                }
                else if (value.Equals("十字星探底"))
                {
                    indexDay = 3;
                    date     = new StockSystem().GetIndexDay(qc.DatePickerFrom, indexDay);
                    date     = DateTimeFunction.ConvertDate(DateTime.Parse(date).ToShortDateString());

                    AISTOCK_STOCK_SINGLE_PIN_V_DATA data = new StockSystem().GetSinglePinData(date, dateTo);
                    foreach (AISTOCK_STOCK_SINGLE_PIN_V_DATA.AISTOCK_STOCK_SINGLE_PIN_VRow dataRow in data.AISTOCK_STOCK_SINGLE_PIN_V.Rows)
                    {
                        AISTOCK_STOCK_BUY_STATS_DATA.AISTOCK_STOCK_BUY_STATSRow saveRow = stats.AISTOCK_STOCK_BUY_STATS.NewAISTOCK_STOCK_BUY_STATSRow();
                        Guid id = Guid.NewGuid();
                        saveRow.STOCK_BUY_ID = id.ToString().ToUpper();
                        saveRow.STOCK_CODE   = dataRow.STOCK_CODE;
                        saveRow.STOCK_NAME   = dataRow.STOCK_NAME;
                        saveRow.STOCK_TYPE   = "十字星探底";
                        saveRow.STOCK_DAY    = dateTo;
                        stats.AISTOCK_STOCK_BUY_STATS.AddAISTOCK_STOCK_BUY_STATSRow(saveRow);
                    }
                }
                else if (value.Equals("锤子线探底"))
                {
                    indexDay = 1;
                    date     = new StockSystem().GetIndexDay(qc.DatePickerFrom, indexDay);
                    date     = DateTimeFunction.ConvertDate(DateTime.Parse(date).ToShortDateString());

                    AISTOCK_STOCK_HAMMER_V_DATA data = new StockSystem().GetHammerData(date, dateTo);
                    foreach (AISTOCK_STOCK_HAMMER_V_DATA.AISTOCK_STOCK_HAMMER_VRow dataRow in data.AISTOCK_STOCK_HAMMER_V.Rows)
                    {
                        AISTOCK_STOCK_BUY_STATS_DATA.AISTOCK_STOCK_BUY_STATSRow saveRow = stats.AISTOCK_STOCK_BUY_STATS.NewAISTOCK_STOCK_BUY_STATSRow();
                        Guid id = Guid.NewGuid();
                        saveRow.STOCK_BUY_ID = id.ToString().ToUpper();
                        saveRow.STOCK_CODE   = dataRow.STOCK_CODE;
                        saveRow.STOCK_NAME   = dataRow.STOCK_NAME;
                        saveRow.STOCK_TYPE   = "锤子线探底";
                        saveRow.STOCK_DAY    = dateTo;
                        stats.AISTOCK_STOCK_BUY_STATS.AddAISTOCK_STOCK_BUY_STATSRow(saveRow);
                    }
                }
                else if (value.Equals("早晨之星"))
                {
                    indexDay = 2;
                    date     = new StockSystem().GetIndexDay(qc.DatePickerFrom, indexDay);
                    date     = DateTimeFunction.ConvertDate(DateTime.Parse(date).ToShortDateString());

                    string twoDate = new StockSystem().GetIndexDay(qc.DatePickerFrom, 1);
                    twoDate = DateTimeFunction.ConvertDate(DateTime.Parse(twoDate).ToShortDateString());
                    AISTOCK_STOCK_MORNING_STAR_V_DATA data = new StockSystem().GetMorningStarData(date, twoDate, dateTo);
                    foreach (AISTOCK_STOCK_MORNING_STAR_V_DATA.AISTOCK_STOCK_MORNING_STAR_VRow dataRow in data.AISTOCK_STOCK_MORNING_STAR_V.Rows)
                    {
                        AISTOCK_STOCK_BUY_STATS_DATA.AISTOCK_STOCK_BUY_STATSRow saveRow = stats.AISTOCK_STOCK_BUY_STATS.NewAISTOCK_STOCK_BUY_STATSRow();
                        Guid id = Guid.NewGuid();
                        saveRow.STOCK_BUY_ID = id.ToString().ToUpper();
                        saveRow.STOCK_CODE   = dataRow.STOCK_CODE;
                        saveRow.STOCK_NAME   = dataRow.STOCK_NAME;
                        saveRow.STOCK_TYPE   = "早晨之星";
                        saveRow.STOCK_DAY    = dateTo;
                        stats.AISTOCK_STOCK_BUY_STATS.AddAISTOCK_STOCK_BUY_STATSRow(saveRow);
                    }
                }
            }
            new StockSystem().SaveStockStatsData(stats);
        }
Пример #13
0
        private void DrawBlafTableHeader()
        {
            //第一行
            TableRow headerRow = this.BmBlafTableHistory.AddHeadRow();

            headerRow.Height = 25;

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //股票代码

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //股票名称

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //证券市场

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 120).HorizontalAlign = HorizontalAlign.Center; //证监会行业

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 120).HorizontalAlign = HorizontalAlign.Center; //行业领域

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 100).HorizontalAlign = HorizontalAlign.Center; //省份

            StockQueryCondition qc = new StockQueryCondition();

            qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

            _dateList = this.SplitDate(qc.DatePickerFrom, qc.DatePickerTo);

            for (int i = _dateList.Count - 1; i >= 0; i--)
            {
                TableCell cell = this.BmBlafTableHistory.AddHeadCell(headerRow, _dateList[i].ToString(), 70 * 12);
                cell.ColumnSpan      = 12;
                cell.HorizontalAlign = HorizontalAlign.Center;
            }

            if (_dateList.Count > 1)
            {
                this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;
                for (int i = _dateList.Count - 1; i > 0; i--)
                {
                    this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;
                }
            }

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //总股本数

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 100).HorizontalAlign = HorizontalAlign.Center; //大股东

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //收入

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //利润

            this.BmBlafTableHistory.AddHeadCell(headerRow, "&nbsp;", 70).HorizontalAlign = HorizontalAlign.Center;  //净利润率

            //第二行
            TableRow secondRow = this.BmBlafTableHistory.AddHeadRow();

            this.BmBlafTableHistory.AddHeadCell(secondRow, "股票代码", 70).HorizontalAlign = HorizontalAlign.Center;   //股票代码

            this.BmBlafTableHistory.AddHeadCell(secondRow, "股票名称", 70).HorizontalAlign = HorizontalAlign.Center;   //股票名称

            this.BmBlafTableHistory.AddHeadCell(secondRow, "证券市场", 70).HorizontalAlign = HorizontalAlign.Center;   //证券市场

            this.BmBlafTableHistory.AddHeadCell(secondRow, "证监会行业", 120).HorizontalAlign = HorizontalAlign.Center; //证监会行业

            this.BmBlafTableHistory.AddHeadCell(secondRow, "行业领域", 120).HorizontalAlign = HorizontalAlign.Center;  //行业领域

            this.BmBlafTableHistory.AddHeadCell(secondRow, "省份", 100).HorizontalAlign = HorizontalAlign.Center;    //省份

            for (int i = _dateList.Count - 1; i >= 0; i--)
            {
                this.BmBlafTableHistory.AddHeadCell(secondRow, "今日开盘价", 70).HorizontalAlign  = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "昨日收盘价", 70).HorizontalAlign  = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "今日收盘价", 70).HorizontalAlign  = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "5日均价", 70).HorizontalAlign   = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "10日均价", 70).HorizontalAlign  = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "20日均价", 70).HorizontalAlign  = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "最高价", 70).HorizontalAlign    = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "最低价", 70).HorizontalAlign    = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "成交量(股)", 70).HorizontalAlign = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "成交额(元)", 70).HorizontalAlign = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "增长率", 70).HorizontalAlign    = HorizontalAlign.Center;
                this.BmBlafTableHistory.AddHeadCell(secondRow, "K线图", 70).HorizontalAlign    = HorizontalAlign.Center;
            }

            if (_dateList.Count > 1)
            {
                this.BmBlafTableHistory.AddHeadCell(secondRow, "累计增长率", 70).HorizontalAlign = HorizontalAlign.Center;
                for (int i = _dateList.Count - 1; i > 0; i--)
                {
                    this.BmBlafTableHistory.AddHeadCell(secondRow, _dateList[i] + "与" + _dateList[i - 1] + "的成交量比率", 70).HorizontalAlign = HorizontalAlign.Center;
                }
            }

            this.BmBlafTableHistory.AddHeadCell(secondRow, "总股本数", 70).HorizontalAlign = HorizontalAlign.Center; //总股本数

            this.BmBlafTableHistory.AddHeadCell(secondRow, "大股东", 100).HorizontalAlign = HorizontalAlign.Center; //大股东

            this.BmBlafTableHistory.AddHeadCell(secondRow, "收入", 70).HorizontalAlign = HorizontalAlign.Center;   //收入

            this.BmBlafTableHistory.AddHeadCell(secondRow, "利润", 70).HorizontalAlign = HorizontalAlign.Center;   //利润

            this.BmBlafTableHistory.AddHeadCell(secondRow, "净利润率", 70).HorizontalAlign = HorizontalAlign.Center; //净利润率

            this.BmBlafTableHistory.Width  = "100%";
            this.BmBlafTableHistory.Height = "400";
        }