本文整理汇总了C#中IDataReader.GetDrValue方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.GetDrValue方法的具体用法?C# IDataReader.GetDrValue怎么用?C# IDataReader.GetDrValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.GetDrValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeAuthorInfo
public AuthorInfoEntity MakeAuthorInfo(IDataReader dr)
{
AuthorInfoEntity authorInfoEntity = new AuthorInfoEntity();
if (dr.HasColumn("bAuthorID"))
{
authorInfoEntity.AuthorID = dr.GetDrValue<Int64>("bAuthorID");
}
if (dr.HasColumn("bJournalID"))
{
authorInfoEntity.JournalID = dr.GetDrValue<Int64>("bJournalID");
}
authorInfoEntity.LoginName = dr.GetDrValue<String>("LoginName");
authorInfoEntity.Pwd = dr.GetDrValue<String>("Pwd");
authorInfoEntity.RealName = dr.GetDrValue<String>("RealName");
authorInfoEntity.Mobile = dr.GetDrValue<String>("Mobile");
authorInfoEntity.LoginIP = dr.GetDrValue<String>("LoginIP");
authorInfoEntity.LoginCount = dr.GetDrValue<Int32>("LoginCount");
authorInfoEntity.LoginDate = dr.GetDrValue<DateTime>("LoginDate");
authorInfoEntity.Status = dr.GetDrValue<Byte>("Status");
authorInfoEntity.GroupID = dr.GetDrValue<Byte>("GroupID");
if (dr.HasColumn("bAddDate"))
{
authorInfoEntity.AddDate = dr.GetDrValue<DateTime>("bAddDate");
}
return authorInfoEntity;
}
示例2: MakeFinanceContributeList
public List<FinanceContributeEntity> MakeFinanceContributeList(IDataReader dr)
{
List<FinanceContributeEntity> list = new List<FinanceContributeEntity>();
while (dr.Read())
{
FinanceContributeEntity financeContributeEntity = new FinanceContributeEntity();
financeContributeEntity.PKID = (Int64)dr["PKID"];
financeContributeEntity.JournalID = (Int64)dr["JournalID"];
financeContributeEntity.CID = (Int64)dr["CID"];
financeContributeEntity.FeeType = (Byte)dr["FeeType"];
financeContributeEntity.Amount = (Decimal)dr["Amount"];
financeContributeEntity.ArticleType = (Int32)dr["ArticleType"];
financeContributeEntity.ArticleCount = (Decimal)dr["ArticleCount"];
financeContributeEntity.PayType = Convert.IsDBNull(dr["PayType"]) ? null : (Byte?)dr["PayType"];
financeContributeEntity.RemitBillNo = Convert.IsDBNull(dr["RemitBillNo"]) ? null : (String)dr["RemitBillNo"];
financeContributeEntity.InUser = (Int64)dr["InUser"];
financeContributeEntity.InComeDate = Convert.IsDBNull(dr["InComeDate"]) ? null : (DateTime?)dr["InComeDate"];
financeContributeEntity.InvoiceNo = Convert.IsDBNull(dr["InvoiceNo"]) ? null : (String)dr["InvoiceNo"];
financeContributeEntity.PostNo = Convert.IsDBNull(dr["PostNo"]) ? null : (String)dr["PostNo"];
financeContributeEntity.SendDate = Convert.IsDBNull(dr["SendDate"]) ? null : (DateTime?)dr["SendDate"];
financeContributeEntity.Note = Convert.IsDBNull(dr["Note"]) ? null : (String)dr["Note"];
financeContributeEntity.AddDate = (DateTime)dr["AddDate"];
financeContributeEntity.Status = dr.GetDrValue<Byte>("Status");
if (dr.HasColumn("Title"))
financeContributeEntity.Title = dr.GetDrValue<String>("Title");
if (dr.HasColumn("AuthorID"))
financeContributeEntity.AuthorID = dr.GetDrValue<Int64>("AuthorID");
if (dr.HasColumn("CNumber"))
financeContributeEntity.CNumber = dr.GetDrValue<String>("CNumber");
list.Add(financeContributeEntity);
}
dr.Close();
return list;
}
示例3: MakeAuthorDetailList
public List<AuthorDetailEntity> MakeAuthorDetailList(IDataReader dr)
{
List<AuthorDetailEntity> list = new List<AuthorDetailEntity>();
while (dr.Read())
{
AuthorDetailEntity authorDetailEntity = new AuthorDetailEntity();
authorDetailEntity.PKID = dr.GetDrValue<Int64>("PKID");
if (dr.HasColumn("bAuthorID"))
{
authorDetailEntity.AuthorID = dr.GetDrValue<Int64>("bAuthorID");
}
if (dr.HasColumn("bJournalID"))
{
authorDetailEntity.JournalID = dr.GetDrValue<Int64>("bJournalID");
}
authorDetailEntity.AuthorName = dr.GetDrValue<String>("AuthorName");
authorDetailEntity.EnglishName = dr.GetDrValue<String>("EnglishName");
authorDetailEntity.Gender = dr.GetDrValue<String>("Gender");
authorDetailEntity.Nation = dr.GetDrValue<String>("Nation");
authorDetailEntity.Birthday = dr.GetDrValue<DateTime?>("Birthday");
authorDetailEntity.NativePlace = dr.GetDrValue<String>("NativePlace");
authorDetailEntity.Province = dr.GetDrValue<String>("Province");
authorDetailEntity.City = dr.GetDrValue<String>("City");
authorDetailEntity.Area = dr.GetDrValue<String>("Area");
authorDetailEntity.IDCard = "'"+dr.GetDrValue<String>("IDCard")+"'";
authorDetailEntity.Address = dr.GetDrValue<String>("Address");
authorDetailEntity.ZipCode = dr.GetDrValue<String>("ZipCode");
authorDetailEntity.Mobile = dr.GetDrValue<String>("Mobile");
authorDetailEntity.Tel = dr.GetDrValue<String>("Tel");
authorDetailEntity.Fax = dr.GetDrValue<String>("Fax");
authorDetailEntity.Education = dr.GetDrValue<Int32>("Education");
authorDetailEntity.Professional = dr.GetDrValue<String>("Professional");
authorDetailEntity.JobTitle = dr.GetDrValue<Int32>("JobTitle");
authorDetailEntity.Job = dr.GetDrValue<String>("Job");
authorDetailEntity.ResearchTopics = dr.GetDrValue<String>("ResearchTopics");
authorDetailEntity.WorkUnit = dr.GetDrValue<String>("WorkUnit");
authorDetailEntity.WorkUnitLevel = dr.GetDrValue<Int32>("WorkUnitLevel");
authorDetailEntity.SectionOffice = dr.GetDrValue<String>("SectionOffice");
authorDetailEntity.InvoiceUnit = dr.GetDrValue<String>("InvoiceUnit");
authorDetailEntity.Mentor = dr.GetDrValue<String>("Mentor");
authorDetailEntity.Remark = dr.GetDrValue<String>("Remark");
authorDetailEntity.AuthorOpus = dr.GetDrValue<String>("AuthorOpus");
authorDetailEntity.QQ = dr.GetDrValue<String>("QQ");
authorDetailEntity.MSN = dr.GetDrValue<String>("MSN");
authorDetailEntity.ReserveField = dr.GetDrValue<String>("ReserveField");
authorDetailEntity.ReserveField1 = dr.GetDrValue<String>("ReserveField1");
authorDetailEntity.ReserveField2 = dr.GetDrValue<String>("ReserveField2");
authorDetailEntity.ReserveField3 = dr.GetDrValue<String>("ReserveField3");
authorDetailEntity.ReserveField4 = dr.GetDrValue<String>("ReserveField4");
authorDetailEntity.ReserveField5 = dr.GetDrValue<String>("ReserveField5");
if (dr.HasColumn("bAddDate"))
{
authorDetailEntity.AddDate = dr.GetDrValue<DateTime>("bAddDate");
}
authorDetailEntity.AuthorModel = MakeAuthorInfo(dr);
authorDetailEntity.AuthorName = authorDetailEntity.AuthorModel.RealName;
list.Add(authorDetailEntity);
}
dr.Close();
return list;
}