本文整理汇总了C#中System.Data.DataRow.Field方法的典型用法代码示例。如果您正苦于以下问题:C# DataRow.Field方法的具体用法?C# DataRow.Field怎么用?C# DataRow.Field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.DataRow
的用法示例。
在下文中一共展示了DataRow.Field方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DimTime
public DimTime(DataRow row)
{
this.TimeId = row.Field<int>("timeid");
this.Hour = row.Field<Int16>("hour");
this.Minute = row.Field<Int16>("minute");
this.Second = row.Field<Int16>("second");
}
示例2: board_stats_Result
/// <summary>
/// Initializes a new instance of the <see cref="board_stats_Result"/> class.
/// </summary>
/// <param name="dr">
/// The dr.
/// </param>
public board_stats_Result(DataRow dr)
{
this.NumPosts = dr.Field<int>("NumPosts");
this.NumTopics = dr.Field<int>("NumTopics");
this.NumUsers = dr.Field<int>("NumUsers");
this.BoardStart = dr.Field<DateTime>("BoardStart");
}
示例3: parmType
public parmType(DataRow drow)
{
id = Convert.ToInt32(drow[0].ToString());
typename = drow.Field<string>(1);
sortorder = Convert.ToInt32(drow[2].ToString());
shortname = drow.Field<string>(3);
}
示例4: ServiceLineModel
public ServiceLineModel(DataRow row)
{
DiagnosisCodeGroupID = row.Field<int>("DiagnosisCodeGroupID");
Description = row.Field<string>("Description");
DisplayOrder = row.Field<int>("DisplayOrder");
Active = row.Field<bool>("Active");
}
示例5: LookupListModel
public LookupListModel(DataRow row)
{
ID = row.Field<int>("ID");
Name = row.Field<string>("Name");
Description = row.Field<string>("Description");
ParentID = row.Field<int?>("ParentID");
}
示例6: TacticBrand
public TacticBrand (DataRow row)
{
if (row.Table.Columns.Contains("TacticID"))
TacticID = row.Field<int>("TacticID");
if (row.Table.Columns.Contains("BrandID"))
BrandID = row.Field<int>("BrandID");
}
示例7: DeckCloudUploadInformation
public DeckCloudUploadInformation(DataRow row)
{
// Get the upload parameters.
Action = row.Field<string>("action");
ContentType = row.Field<string>("Content-Type");
XAmzDate = row.Field<string>("x-amz-date");
Authorization = row.Field<string>("Authorization");
}
示例8: PopulateSession
private static Session PopulateSession(DataRow session)
{
return new Session
{
SessionId = session.Field<Guid>("SessionId").ToString(),
UserId = session.Field<int>("UserId")
};
}
示例9: LoadFromDatabase
protected override bool LoadFromDatabase(DataRow row) {
Index = row.Field<short>("index");
ID = row.Field<int>("id");
Level = row.Field<ushort>("level");
Type = (EHotkeyType)row.Field<int>("type");
return true;
}
示例10: HydrateEmployeeDTO
private static PersonDTO HydrateEmployeeDTO(DataRow dr)
{
PersonDTO result = new PersonDTO();
result.BusinessEntityId = dr.Field<int>("BusinessEntityID");
result.PersonType = dr.Field<string>("PersonType");
result.NameStyle = dr.Field<bool>("NameStyle");
result.Title = dr.Field<string>("Title");
return result;
}
示例11: Settings
public Settings (DataRow row)
{
if (row.Table.Columns.Contains("Key"))
Key = row.Field<string>("Key");
if (row.Table.Columns.Contains("Value"))
Value = row.Field<string>("Value");
if (row.Table.Columns.Contains("Description"))
Description = row.Field<string>("Description");
}
示例12: AddCapture
private void AddCapture(DataRow dr)
{
CaptureTesting capture = new CaptureTesting();
capture.captureId = dr.Field<String>("captureId");
capture.capturedOn = dr.Field<DateTime?>("capturedOn");
capture.numberFrames = dr.Field<Int32>("numberFrames");
list.Add(capture);
}
示例13: TacticDiagnosisGroup
public TacticDiagnosisGroup (DataRow row)
{
if (row.Table.Columns.Contains("TacticDiagnosisGroupID"))
TacticDiagnosisGroupID = row.Field<int>("TacticDiagnosisGroupID");
if (row.Table.Columns.Contains("DiagnosisCodeGroupID"))
DiagnosisCodeGroupID = row.Field<int>("DiagnosisCodeGroupID");
if (row.Table.Columns.Contains("TacticID"))
TacticID = row.Field<int>("TacticID");
}
示例14: AddResumeRow
public void AddResumeRow(DataRow x)
{
XSSFRow row = this._Sheet.CreateRow(this._RowIndexResume) as XSSFRow;
row.CreateCell(00, CellType.NUMERIC).SetCellValue(x.Field<int>("DESID"));
row.CreateCell(01, CellType.NUMERIC).SetCellValue(x.Field<int>("Cajas"));
row.CreateCell(02, CellType.NUMERIC).SetCellValue(x.Field<int>("Registros"));
row.CreateCell(03, CellType.NUMERIC).SetCellValue(x.Field<int>("Imagenes"));
row.CreateCell(04, CellType.STRING).SetCellValue(x.Field<long>("PesoEstimado").FormatBytes());
}
示例15: PopulateTagType
private static TagType PopulateTagType(DataRow tagType)
{
return new TagType
{
TagTypeId = tagType.Field<int>("TagTypeId"),
TypeName = tagType.Field<string>("TypeName"),
Points = tagType.Field<int>("Points"),
LockoutTimePeriod = tagType.Field<int>("LockoutTimePeriod")
};
}