本文整理汇总了C#中PlayerInfo.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerInfo.GetType方法的具体用法?C# PlayerInfo.GetType怎么用?C# PlayerInfo.GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerInfo
的用法示例。
在下文中一共展示了PlayerInfo.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RetrievePlayerDetailsFromEPI
public Dictionary<string, string> RetrievePlayerDetailsFromEPI(int InstallationNo)
{
Dictionary<string, string> _PlayerInfo = null;
AnalysisDataAccess analysisBusinessObject = new AnalysisDataAccess();
DataTable dt = analysisBusinessObject.GetEPIDetails(InstallationNo);
_PlayerInfo = new Dictionary<string, string>();
PlayerInfo _POSDetail = null;
foreach (DataRow dr in dt.Rows)
{
_POSDetail = new PlayerInfo();
if (dr["IsEPIAvailable"].ToString() == "1")
{
_POSDetail.IsEPIAvailable = true;
_POSDetail.AccountNumber = dr["EPIDetails"].ToString();
Dictionary<string, string> PlayerInfo = GetPlayerInfo(_POSDetail.AccountNumber);
if (PlayerInfo != null)
{
//string PlayerName;
string FirstName, LastName = string.Empty;
string PlayerStatus;
TimeSpan CardTimeIn = new TimeSpan(0, 0, 0);
if (PlayerInfo.TryGetValue("FirstName", out FirstName))
_POSDetail.DisplayName = FirstName;
if (PlayerInfo.TryGetValue("LastName", out LastName))
_POSDetail.DisplayName = FirstName + " " + LastName;
if (PlayerInfo.TryGetValue("ClubState", out PlayerStatus))
_POSDetail.ClubState = PlayerStatus;
if (PlayerInfo.TryGetValue("ClubStatus", out PlayerStatus))
_POSDetail.ClubStatus = PlayerStatus;
DateTime CardedTime;
if (DateTime.TryParse(dr["CardinTime"].ToString(), out CardedTime))
CardTimeIn = DateTime.Now.Subtract(CardedTime);
_POSDetail.PlayerTimeOfPlay += (CardTimeIn.Hours / 60).ToString() + " : " + CardTimeIn.Minutes.ToString() + " : " + CardTimeIn.Seconds.ToString();
}
}
else
_POSDetail.IsEPIAvailable = false;
foreach (PropertyInfo info in _POSDetail.GetType().GetProperties())
{
_PlayerInfo.Add(info.Name, info.GetValue(_POSDetail, null) == null ? "" : info.GetValue(_POSDetail, null).ToString());
}
}
return _PlayerInfo;
}