/// <summary>
 /// Initially will get the EpiDetails using installation.
 /// With the account details from the epidetails, will get the Player details
 /// </summary>
 /// <param name="InstallationNo"></param>
 /// <returns></returns>
 public DataTable RetrievePlayerDetails_CMP(int InstallationNo)
 {
     AnalysisDataAccess analysisBusinessObject = new AnalysisDataAccess();
     DataTable dtPlayerInfo = null;
     {
         dtPlayerInfo = analysisBusinessObject.GetPlayerDetails(InstallationNo);
     }
     return dtPlayerInfo;
 }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public Analysis()
 {
     analysisDataAccessHandler = new AnalysisDataAccess();
 }