private void DrawTableBody(AISTOCK_STATS_PERCENT_V_DATA data, DataTable leader) { string field = string.Empty; string increasePercent = string.Empty; TableRow bodyRow; for (int i = 0; i < leader.Rows.Count; i++) { field = leader.Rows[i][0].ToString(); DataRow[] row = data.AISTOCK_STATS_PERCENT_V.Select("FIELD_MAIN = '" + field + "'"); AISTOCK_STATS_PERCENT_V_DATA.AISTOCK_STATS_PERCENT_VRow thisRow = (AISTOCK_STATS_PERCENT_V_DATA.AISTOCK_STATS_PERCENT_VRow)row[0]; bodyRow = this.BmBlafTable.AddBodyRow(); this.BmBlafTable.AddCell(bodyRow, thisRow.FIELD_MAIN.ToString(), HorizontalAlign.Left); //证监会行业 this.BmBlafTable.AddCell(bodyRow, thisRow.IsTOTALNull() ? string.Empty :thisRow.TOTAL.ToString(), HorizontalAlign.Left); // this.BmBlafTable.AddCell(bodyRow, thisRow.IsTOTAL_INCREASENull() ? string.Empty : thisRow.TOTAL_INCREASE.ToString(), HorizontalAlign.Left); // this.BmBlafTable.AddCell(bodyRow, thisRow.IsTOTAL_DECREASENull() ? string.Empty : thisRow.TOTAL_DECREASE.ToString(), HorizontalAlign.Left); // if (!thisRow.IsTOTALNull() && !thisRow.IsTOTAL_INCREASENull()) { this.BmBlafTable.AddCell(bodyRow, (decimal.Parse(thisRow.TOTAL_INCREASE.ToString()) / decimal.Parse(thisRow.TOTAL.ToString())).ToString("0.0000"), HorizontalAlign.Left);//增长率 } else { this.BmBlafTable.AddCell(bodyRow, string.Empty, HorizontalAlign.Left); } this.BmBlafTable.AddCell(bodyRow, leader.Rows[i][2].ToString(), HorizontalAlign.Left); //股票代码 this.BmBlafTable.AddCell(bodyRow, leader.Rows[i][3].ToString(), HorizontalAlign.Left); //股票名称 this.BmBlafTable.AddCell(bodyRow, leader.Rows[i][1].ToString(), HorizontalAlign.Left); //涨幅 this.BmBlafTable.AddCell(bodyRow, leader.Rows[i][4].ToString(), HorizontalAlign.Left); //标准行业 this.BmBlafTable.AddCell(bodyRow, leader.Rows[i][5].ToString(), HorizontalAlign.Left); //省份 this.BmBlafTable.AddCell(bodyRow, leader.Rows[i][6].ToString(), HorizontalAlign.Left); //K线图 } }
public override global::System.Data.DataSet Clone() { AISTOCK_STATS_PERCENT_V_DATA cln = ((AISTOCK_STATS_PERCENT_V_DATA)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
/// <summary> /// 根据证监会行业统计当天的增长比率 /// </summary> /// <param name="date"></param> public AISTOCK_STATS_PERCENT_V_DATA GetStockStatsVData(string date) { AISTOCK_STATS_PERCENT_V_DATA data = new AISTOCK_STATS_PERCENT_V_DATA(); using (DaStock da = new DaStock()) { da.LoadStockStatsVData(data.AISTOCK_STATS_PERCENT_V, date); } return(data); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { AISTOCK_STATS_PERCENT_V_DATA ds = new AISTOCK_STATS_PERCENT_V_DATA(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); AISTOCK_STATS_PERCENT_V_DATA ds = new AISTOCK_STATS_PERCENT_V_DATA(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "AISTOCK_STATS_PERCENT_VDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }