本文整理汇总了C#中System.Data.DataColumn类的典型用法代码示例。如果您正苦于以下问题:C# System.Data.DataColumn类的具体用法?C# System.Data.DataColumn怎么用?C# System.Data.DataColumn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.Data.DataColumn类属于命名空间,在下文中一共展示了System.Data.DataColumn类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataReaderToDataTable
public System.Data.DataTable DataReaderToDataTable(MySqlDataReader Reader)
{
System.Data.DataTable dt = new System.Data.DataTable();
System.Data.DataColumn dc;
System.Data.DataRow dr;
ArrayList arr = new ArrayList();
int i;
for(i=0;i<Reader.FieldCount;i++)
{
dc = new System.Data.DataColumn();
dc.ColumnName = Reader.GetName(i);
arr.Add(dc.ColumnName);
dt.Columns.Add(dc);
}
while(Reader.Read())
{
dr = dt.NewRow();
for (i=0;i<Reader.FieldCount;i++)
{
dr[(string)arr[i]] = Reader[i].ToString();
}
dt.Rows.Add(dr);
}
Reader.Close();
return dt;
}
示例2: Init
public static void Init()
{
dataTable = new System.Data.DataTable("Ivas");
System.Data.DataColumn myDataColumn;
myDataColumn = new System.Data.DataColumn();
myDataColumn.DataType = System.Type.GetType("System.Int32");
myDataColumn.ColumnName = "Codigo";
dataTable.Columns.Add(myDataColumn);
myDataColumn = new System.Data.DataColumn();
myDataColumn.DataType = System.Type.GetType("System.Int32");
myDataColumn.ColumnName = "Porcentaje";
dataTable.Columns.Add(myDataColumn);
dataTable.PrimaryKey = new System.Data.DataColumn[]{dataTable.Columns["Codigo"]} ;
System.Data.DataRow dataRow ;
for ( int i = 0 ; i < 5 ; i++ )
{
dataRow = dataTable.NewRow();
dataRow["Codigo"] = i+1 ;
dataRow["Porcentaje"] = 0 ;
dataTable.Rows.Add(dataRow);
}
}
示例3: Plaza
public Plaza()
{
x = y = 0 ;
tipoMesa = false ;
estado = EstadoActiva ;
juntadaCon = -1 ;
//Generamos la tabla
dataLineas.Columns.Clear();
System.Data.DataColumn miColumna ;
miColumna = new System.Data.DataColumn();
miColumna.DataType = System.Type.GetType("System.String");
miColumna.ColumnName = "Nombre" ;
dataLineas.Columns.Add(miColumna);
miColumna = new System.Data.DataColumn();
miColumna.DataType = System.Type.GetType("System.String");
miColumna.ColumnName = "Estado" ;
dataLineas.Columns.Add(miColumna);
miColumna = new System.Data.DataColumn();
miColumna.DataType = System.Type.GetType("System.Double");
miColumna.ColumnName = "Precio" ;
dataLineas.Columns.Add(miColumna);
}
示例4: CSVToDataTable
/// <summary>
/// Export data from CSV file given the full filename.
/// </summary>
/// <param name="FileName">CSV file</param>
/// <returns>DataTable containing data from CSV file. All columns are in string type.</returns>
public static System.Data.DataTable CSVToDataTable(string FileName)
{
#region logic
System.Data.DataTable result = new System.Data.DataTable();
System.IO.StreamReader fileReader = null;
if (!System.IO.File.Exists(FileName))
{
throw new System.IO.IOException("File not found!");
}
if (new System.IO.FileInfo(FileName).Length == 0)
{
throw new Exception("File is EMPTY!");
}
try
{
fileReader = new System.IO.StreamReader(FileName);
List<string> headers = RowToList(fileReader.ReadLine());
foreach (string header in headers)
{
System.Data.DataColumn tempColumn = new System.Data.DataColumn();
tempColumn.ColumnName = header;
tempColumn.DataType = Type.GetType("System.String");
result.Columns.Add(tempColumn);
tempColumn = null;
}
string singleRow = "";
while ((singleRow = fileReader.ReadLine()) != null)
{
System.Data.DataRow tempRow = result.NewRow();
List<string> dataInList = RowToList(singleRow);
for (int i = 0; i < result.Columns.Count; i++)
{
tempRow.ItemArray[i] = dataInList[i];
}
}
}
#endregion
#region exception handling
catch (Exception AllEx)
{
throw AllEx;
}
finally
{
if (fileReader.BaseStream.CanRead)
{
fileReader.Close();
}
fileReader = null;
}
#endregion
return result;
}
示例5: GetEmptyDataTable
public static System.Data.DataTable GetEmptyDataTable(List<string> ColumnNames)
{
System.Data.DataTable table = new System.Data.DataTable();
System.Data.DataColumn column;
foreach (string s in ColumnNames)
{
if (!string.IsNullOrWhiteSpace(s))
{
column = new System.Data.DataColumn();
column.DataType = typeof(System.String);
column.ColumnName = s;
table.Columns.Add(column);
}
}
return table;
}
示例6: InitClass
private void InitClass() {
this.columnKOD_T = new System.Data.DataColumn("KOD_T", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnKOD_T);
this.columnNAME_T = new System.Data.DataColumn("NAME_T", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnNAME_T);
this.columnDOZA = new System.Data.DataColumn("DOZA", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnDOZA);
this.columnFORMA_VIP = new System.Data.DataColumn("FORMA_VIP", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnFORMA_VIP);
this.columnOBJEM = new System.Data.DataColumn("OBJEM", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnOBJEM);
this.columnED_IZM = new System.Data.DataColumn("ED_IZM", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnED_IZM);
this.columnVES = new System.Data.DataColumn("VES", typeof(decimal), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnVES);
this.columnCENA_IZG = new System.Data.DataColumn("CENA_IZG", typeof(decimal), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnCENA_IZG);
this.columnPROC_REG = new System.Data.DataColumn("PROC_REG", typeof(short), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnPROC_REG);
this.columnID_IZG = new System.Data.DataColumn("ID_IZG", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnID_IZG);
this.columnID_KL1 = new System.Data.DataColumn("ID_KL1", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnID_KL1);
this.columnID_KL2 = new System.Data.DataColumn("ID_KL2", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnID_KL2);
this.columnID_KL3 = new System.Data.DataColumn("ID_KL3", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnID_KL3);
this.columnPR_NDS = new System.Data.DataColumn("PR_NDS", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnPR_NDS);
this.columnKOL_UP = new System.Data.DataColumn("KOL_UP", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnKOL_UP);
this.columnDATA_REG = new System.Data.DataColumn("DATA_REG", typeof(System.DateTime), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnDATA_REG);
this.columnN_REG = new System.Data.DataColumn("N_REG", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnN_REG);
this.columnAUTOR = new System.Data.DataColumn("AUTOR", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnAUTOR);
this.columnCR_DATE = new System.Data.DataColumn("CR_DATE", typeof(System.DateTime), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnCR_DATE);
this.columnSNAME_T = new System.Data.DataColumn("SNAME_T", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnSNAME_T);
this.columnOLD_NAMET = new System.Data.DataColumn("OLD_NAMET", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnOLD_NAMET);
this.columnNAMET1 = new System.Data.DataColumn("NAMET1", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnNAMET1);
this.columnIS_RECEPT = new System.Data.DataColumn("IS_RECEPT", typeof(short), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnIS_RECEPT);
this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
this.columnKOD_T}, true));
this.columnKOD_T.AllowDBNull = false;
this.columnKOD_T.Unique = true;
this.columnNAME_T.MaxLength = 255;
this.columnDOZA.MaxLength = 10;
this.columnFORMA_VIP.MaxLength = 10;
this.columnOBJEM.MaxLength = 10;
this.columnED_IZM.MaxLength = 5;
this.columnPR_NDS.MaxLength = 1;
this.columnN_REG.MaxLength = 20;
this.columnAUTOR.MaxLength = 10;
this.columnSNAME_T.MaxLength = 12;
this.columnOLD_NAMET.MaxLength = 35;
this.columnNAMET1.MaxLength = 255;
}
示例7: InitializeComponent
//.........这里部分代码省略.........
this.qDteBegin = new System.Windows.Forms.DateTimePicker();
this.label25 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.qTxtScdd = new System.Windows.Forms.TextBox();
this.label23 = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.textBox11 = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.textBox12 = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.textBox13 = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.textBox14 = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.textBox15 = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.textBox16 = new System.Windows.Forms.TextBox();
this.textBox17 = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.textBox18 = new System.Windows.Forms.TextBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.label22 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.uGridData = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.dataSet1 = new System.Data.DataSet();
this.dataTable1 = new System.Data.DataTable();
this.dataColumn1 = new System.Data.DataColumn();
this.dataColumn2 = new System.Data.DataColumn();
this.dataColumn7 = new System.Data.DataColumn();
this.dataColumn12 = new System.Data.DataColumn();
this.dataColumn15 = new System.Data.DataColumn();
this.dataColumn16 = new System.Data.DataColumn();
this.dataColumn17 = new System.Data.DataColumn();
this.dataColumn18 = new System.Data.DataColumn();
this.dataColumn20 = new System.Data.DataColumn();
this.dataColumn9 = new System.Data.DataColumn();
this.dataColumn10 = new System.Data.DataColumn();
this.dataColumn3 = new System.Data.DataColumn();
this.dataTable2 = new System.Data.DataTable();
this.dataColumn4 = new System.Data.DataColumn();
this.dataColumn5 = new System.Data.DataColumn();
this.dataColumn6 = new System.Data.DataColumn();
this.dataColumn11 = new System.Data.DataColumn();
this.dataColumn8 = new System.Data.DataColumn();
this.ultraGridExcelExporter1 = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter(this.components);
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.uToolBar)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ugpData)).BeginInit();
this.ugpData.SuspendLayout();
this.ultraExpandableGroupBoxPanel1.SuspendLayout();
this.pnlHint.SuspendLayout();
this.pnlData.SuspendLayout();
this.pnlDataRight.SuspendLayout();
this.pnlDataLeft.SuspendLayout();
this.panel5.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.uGridData)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataTable1)).BeginInit();
示例8: InitClass
private void InitClass() {
this.columnid = new System.Data.DataColumn("id", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnid);
this.columnFIO = new System.Data.DataColumn("FIO", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnFIO);
this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
this.columnid}, true));
this.columnid.AutoIncrement = true;
this.columnid.AllowDBNull = false;
this.columnid.ReadOnly = true;
this.columnid.Unique = true;
this.columnFIO.AllowDBNull = false;
this.columnFIO.MaxLength = 200;
}
示例9: ReadCSV
public static void ReadCSV(this System.Data.DataTable dt, string path, string token)
{
var iterator = Regulus.Utility.CSV.Read(path, token).GetEnumerator();
//System.Data.DataTable dt = new System.Data.DataTable();
// 第一行
//iterator.MoveNext();
// 第二行
iterator.MoveNext();
Regulus.Utility.CSV.Row rowNames = iterator.Current;
// 第三行
iterator.MoveNext();
Regulus.Utility.CSV.Row rowTypes = iterator.Current;
if (rowTypes.Fields.Length != rowNames.Fields.Length)
{
throw new System.Exception(string.Format("名稱與型別數量不符: RowNameCount={0},RowTypeCount={1}", rowNames.Fields.Length, rowTypes.Fields.Length));
}
string[] defaultValues = new string[rowTypes.Fields.Length];
for (int i = 0; i < rowNames.Fields.Length; ++i)
{
string name = rowNames.Fields[i];
string strType = rowTypes.Fields[i];
var result = (from ddt in DataTableType.Types where ddt.Name == strType select ddt).FirstOrDefault();
defaultValues[i] = result.Default;
if (result != null)
{
System.Data.DataColumn dc = new System.Data.DataColumn(name, result.Type);
dt.Columns.Add(dc);
}
else
{
throw new System.Exception("無效的型別:" + strType);
}
}
int rowCount = rowNames.Fields.Length;
while (iterator.MoveNext() == true)
{
var row = iterator.Current;
string[] fields = row.Fields;
if (fields.Length == rowCount)
{
System.Data.DataRow dtRow = dt.NewRow();
int i = 0;
foreach (var name in rowNames.Fields)
{
var field = fields[i] == "" ? defaultValues[i] : fields[i] ;
dtRow[name] = field;
++i;
}
dt.Rows.Add(dtRow);
}
else
{
throw new System.Exception(string.Format("資料欄位與名稱數量不符: Index={0},RowCount={1},FieldCount={2}", row.Index, rowCount, fields.Length));
}
}
}
示例10: InitClass
private void InitClass() {
this.columnmenuTitle = new System.Data.DataColumn("menuTitle", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnmenuTitle);
this.columnleftmenuUrl = new System.Data.DataColumn("leftmenuUrl", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnleftmenuUrl);
this.columncontentUrl = new System.Data.DataColumn("contentUrl", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columncontentUrl);
}
示例11: InitClass
private void InitClass() {
this.columnyatisTarihi = new System.Data.DataColumn("yatisTarihi", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnyatisTarihi);
this.columncikisTarihi = new System.Data.DataColumn("cikisTarihi", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columncikisTarihi);
}
示例12: InitializeComponent
//.........这里部分代码省略.........
Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn56 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("FS_VOICENAME");
Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn57 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("FS_VOICEFILE");
Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn58 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("FS_INSTRTYPE");
Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinTabControl.UltraTab ultraTab2 = new Infragistics.Win.UltraWinTabControl.UltraTab();
Infragistics.Win.UltraWinTabControl.UltraTab ultraTab1 = new Infragistics.Win.UltraWinTabControl.UltraTab();
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1");
Infragistics.Win.UltraWinToolbars.ControlContainerTool controlContainerTool4 = new Infragistics.Win.UltraWinToolbars.ControlContainerTool("����");
Infragistics.Win.UltraWinToolbars.ControlContainerTool controlContainerTool5 = new Infragistics.Win.UltraWinToolbars.ControlContainerTool("��");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("find");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Aedio");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("btCorrention");
Infragistics.Win.UltraWinToolbars.ControlContainerTool controlContainerTool1 = new Infragistics.Win.UltraWinToolbars.ControlContainerTool("����");
Infragistics.Win.UltraWinToolbars.ControlContainerTool controlContainerTool2 = new Infragistics.Win.UltraWinToolbars.ControlContainerTool("¯��");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Query");
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrackWeightForIron));
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Aedio");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("find");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("btCorrention");
Infragistics.Win.UltraWinToolbars.ControlContainerTool controlContainerTool6 = new Infragistics.Win.UltraWinToolbars.ControlContainerTool("��");
Infragistics.Win.UltraWinDock.DockAreaPane dockAreaPane1 = new Infragistics.Win.UltraWinDock.DockAreaPane(Infragistics.Win.UltraWinDock.DockedLocation.DockedRight, new System.Guid("05deab1a-dfec-4181-9cb3-ad4fe0377535"));
Infragistics.Win.UltraWinDock.DockableControlPane dockableControlPane1 = new Infragistics.Win.UltraWinDock.DockableControlPane(new System.Guid("89870e2b-ce2c-4fc0-9610-41bf1733973c"), new System.Guid("00000000-0000-0000-0000-000000000000"), -1, new System.Guid("05deab1a-dfec-4181-9cb3-ad4fe0377535"), -1);
Infragistics.Win.UltraWinDock.DockAreaPane dockAreaPane2 = new Infragistics.Win.UltraWinDock.DockAreaPane(Infragistics.Win.UltraWinDock.DockedLocation.DockedRight, new System.Guid("777aa848-96d9-4a9c-8e57-ab46776d741c"));
Infragistics.Win.UltraWinDock.DockableControlPane dockableControlPane2 = new Infragistics.Win.UltraWinDock.DockableControlPane(new System.Guid("167a762b-28a1-4b3a-b58a-b7c31ec2d826"), new System.Guid("00000000-0000-0000-0000-000000000000"), -1, new System.Guid("777aa848-96d9-4a9c-8e57-ab46776d741c"), -1);
this.ultraTabPageControl2 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl();
this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.dataSet2 = new System.Data.DataSet();
this.dataTable6 = new System.Data.DataTable();
this.dataColumn57 = new System.Data.DataColumn();
this.dataColumn58 = new System.Data.DataColumn();
this.dataColumn59 = new System.Data.DataColumn();
this.dataColumn60 = new System.Data.DataColumn();
this.dataColumn61 = new System.Data.DataColumn();
this.dataColumn62 = new System.Data.DataColumn();
this.dataColumn63 = new System.Data.DataColumn();
this.dataColumn64 = new System.Data.DataColumn();
this.dataColumn65 = new System.Data.DataColumn();
this.dataColumn66 = new System.Data.DataColumn();
this.dataColumn67 = new System.Data.DataColumn();
this.dataColumn68 = new System.Data.DataColumn();
this.dataColumn69 = new System.Data.DataColumn();
this.dataColumn70 = new System.Data.DataColumn();
this.dataTable7 = new System.Data.DataTable();
this.dataColumn71 = new System.Data.DataColumn();
this.dataColumn72 = new System.Data.DataColumn();
this.dataColumn73 = new System.Data.DataColumn();
this.dataColumn74 = new System.Data.DataColumn();
this.dataColumn75 = new System.Data.DataColumn();
this.dataColumn76 = new System.Data.DataColumn();
this.dataColumn77 = new System.Data.DataColumn();
this.dataColumn78 = new System.Data.DataColumn();
this.dataColumn79 = new System.Data.DataColumn();
this.dataColumn80 = new System.Data.DataColumn();
this.dataColumn82 = new System.Data.DataColumn();
this.dataColumn83 = new System.Data.DataColumn();
this.dataColumn84 = new System.Data.DataColumn();
this.dataColumn85 = new System.Data.DataColumn();
this.dataColumn86 = new System.Data.DataColumn();
this.dataColumn87 = new System.Data.DataColumn();
this.dataColumn88 = new System.Data.DataColumn();
this.dataColumn89 = new System.Data.DataColumn();
示例13: ProcessRequest
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "application/json";
List<NFMT.Charts.ChartModel> list = new List<NFMT.Charts.ChartModel>();
NFMT.Charts.ChartModel model = new NFMT.Charts.ChartModel();
//X横向轴说明数据
model.XAxis.Categories.Add("一月");
model.XAxis.Categories.Add("二月");
model.XAxis.Categories.Add("三月");
model.XAxis.Categories.Add("四月");
model.XAxis.Categories.Add("五月");
model.XAxis.Categories.Add("六月");
model.XAxis.Categories.Add("七月");
model.XAxis.Categories.Add("八月");
model.XAxis.Categories.Add("九月");
model.XAxis.Categories.Add("十月");
model.XAxis.Categories.Add("十一月");
model.XAxis.Categories.Add("十二月");
//主标题
model.Title ="2013年迈科入库表";
//model.Title.X.Add("-20");
model.SubTitle = "副标题";
//Y轴数据
model.YAxis.Title ="重量(吨)";
model.Tooltip = "吨";
//model.YAxis.PlotLines.Value.Add("0");
//model.YAxis.PlotLines.Width.Add("1");
//model.YAxis.PlotLines.Color.Add("#808080");
//提示框数据单位
//model.Tooltip.ValueSuffix.Add("吨");
//图形选项配置数据
//model.Legend.Layout.Add("vertical");
//model.Legend.Align.Add("right");
//model.Legend.VerticalAlign.Add("middle");
//model.Legend.BorderWidth.Add("0");
//线性数据
//model.Series["铜"]["12000, 12300, 26000, 15822, 15201, 18005, 25001, 25410, 12546, 21542, 15800, 16500"];
//model.Series.Add("铜");
//model.Series.Add("铝");
//model.Series.Add("锌");
//model.Series.Add("其他");
//model.Series.Add("12000, 12300, 26000, 15822, 15201, 18005, 25001, 25410, 12546, 21542, 15800, 16500");
//model.Series.Add("2000, 1300, 2000, 5822, 5201, 8005, 5001, 5410, 2546, 1542, 5800, 6500");
//model.Series.Add("1500, 2300, 6000, 1822, 1201, 1005, 2001, 1410, 1546, 5542, 5800, 2500");
//model.Series.Add("5841, 2800, 1200, 1422, 800, 2000, 1200, 1810, 1500, 5181, 2800, 5500");
//NFMT.Data.DAL.BDStyleDAL dal = new NFMT.Data.DAL.BDStyleDAL();
//for (int i = 15; i < 17; i++)
//{
// NFMT.Common.IModel bDStyle = dal.Get(NFMT.Common.DefaultValue.SysUser, i).ReturnValue as NFMT.Common.IModel;
// model.Series.Add(i.ToString(), bDStyle);
//}
//model.Series.Add("Name:铝", "Data:12000, 12300, 26000, 15822, 15201, 18005, 25001, 25410, 12546, 21542, 15800, 16500");
//model.Series.Add("Name:锌", "Data:12000, 12300, 26000, 15822, 15201, 18005, 25001, 25410, 12546, 21542, 15800, 16500");
//model.Series.Add("Name:其他", "Data:12000, 12300, 26000, 15822, 15201, 18005, 25001, 25410, 12546, 21542, 15800, 16500");
System.Data.DataTable dt = new System.Data.DataTable();
System.Data.DataColumn column = new System.Data.DataColumn("asset");
dt.Columns.Add(column);
column = new System.Data.DataColumn("一月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("二月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("三月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("四月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("五月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("六月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("七月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("八月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("九月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("十月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("十一月");
dt.Columns.Add(column);
column = new System.Data.DataColumn("十二月");
dt.Columns.Add(column);
System.Random random = new Random();
System.Data.DataRow row = null;
row = dt.NewRow();
row[0] = "铜";
for (int i = 1; i < 13; i++)
//.........这里部分代码省略.........
示例14: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDBConfig));
this.cbDatabaseName = new System.Windows.Forms.ComboBox();
this.dtDatabaseName = new System.Data.DataTable();
this.dataColumn1 = new System.Data.DataColumn();
this.txtServerName = new System.Windows.Forms.TextBox();
this.rbSQLSecurity = new System.Windows.Forms.RadioButton();
this.lblHeader = new System.Windows.Forms.Label();
this.picLOGO = new System.Windows.Forms.PictureBox();
this.ds = new System.Data.DataSet();
this.picHeader = new System.Windows.Forms.PictureBox();
this.bttnInfo = new System.Windows.Forms.Button();
this.bttnAdd = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.rbNTSecurity = new System.Windows.Forms.RadioButton();
this.label6 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.txtUserId = new System.Windows.Forms.TextBox();
this.txtPassword = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dtDatabaseName)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picLOGO)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ds)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picHeader)).BeginInit();
this.panel1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// cbDatabaseName
//
this.cbDatabaseName.DataSource = this.dtDatabaseName;
this.cbDatabaseName.DisplayMember = "Name";
this.cbDatabaseName.Location = new System.Drawing.Point(140, 190);
this.cbDatabaseName.Name = "cbDatabaseName";
this.cbDatabaseName.Size = new System.Drawing.Size(153, 21);
this.cbDatabaseName.TabIndex = 160;
this.cbDatabaseName.ValueMember = "Name";
this.cbDatabaseName.DropDown += new System.EventHandler(this.cbDatabaseName_DropDown);
//
// dtDatabaseName
//
this.dtDatabaseName.Columns.AddRange(new System.Data.DataColumn[] {
this.dataColumn1});
this.dtDatabaseName.TableName = "DatabaseName";
//
// dataColumn1
//
this.dataColumn1.ColumnName = "Name";
//
// txtServerName
//
this.txtServerName.Location = new System.Drawing.Point(226, 21);
this.txtServerName.Name = "txtServerName";
this.txtServerName.Size = new System.Drawing.Size(192, 20);
this.txtServerName.TabIndex = 159;
this.txtServerName.Text = ".";
//
// rbSQLSecurity
//
this.rbSQLSecurity.Location = new System.Drawing.Point(45, 90);
this.rbSQLSecurity.Name = "rbSQLSecurity";
this.rbSQLSecurity.Size = new System.Drawing.Size(233, 24);
this.rbSQLSecurity.TabIndex = 158;
this.rbSQLSecurity.Text = "Sử dụng tên đăng nhập và mật khẩu riêng.";
this.rbSQLSecurity.CheckedChanged += new System.EventHandler(this.rbSQLSecurity_CheckedChanged);
//
// lblHeader
//
this.lblHeader.AutoSize = true;
this.lblHeader.BackColor = System.Drawing.Color.Transparent;
this.lblHeader.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblHeader.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblHeader.ForeColor = System.Drawing.Color.White;
this.lblHeader.Location = new System.Drawing.Point(138, 9);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Size = new System.Drawing.Size(198, 19);
this.lblHeader.TabIndex = 171;
this.lblHeader.Text = "Cấu Hình Cơ Sở Dữ Liệu";
//
// picLOGO
//
this.picLOGO.Image = ((System.Drawing.Image)(resources.GetObject("picLOGO.Image")));
this.picLOGO.Location = new System.Drawing.Point(0, 0);
this.picLOGO.Name = "picLOGO";
this.picLOGO.Size = new System.Drawing.Size(32, 24);
this.picLOGO.TabIndex = 170;
this.picLOGO.TabStop = false;
//
// ds
//
//.........这里部分代码省略.........
示例15: InitClass
private void InitClass() {
this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnCustomerID);
this.columnCompanyName = new System.Data.DataColumn("CompanyName", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnCompanyName);
this.columnContactName = new System.Data.DataColumn("ContactName", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnContactName);
this.columnContactTitle = new System.Data.DataColumn("ContactTitle", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnContactTitle);
this.columnAddress = new System.Data.DataColumn("Address", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnAddress);
this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnCity);
this.columnRegion = new System.Data.DataColumn("Region", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnRegion);
this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnPostalCode);
this.columnCountry = new System.Data.DataColumn("Country", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnCountry);
this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnPhone);
this.columnFax = new System.Data.DataColumn("Fax", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnFax);
this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
this.columnCustomerID}, false));
this.columnCustomerID.AllowDBNull = false;
this.columnCustomerID.Unique = true;
this.columnCustomerID.MaxLength = 5;
this.columnCompanyName.AllowDBNull = false;
this.columnCompanyName.MaxLength = 40;
this.columnContactName.MaxLength = 30;
this.columnContactTitle.MaxLength = 30;
this.columnAddress.MaxLength = 60;
this.columnCity.MaxLength = 15;
this.columnRegion.MaxLength = 15;
this.columnPostalCode.MaxLength = 10;
this.columnCountry.MaxLength = 15;
this.columnPhone.MaxLength = 24;
this.columnFax.MaxLength = 24;
}