Exemple #1
0
        private void SaveChatLog(Allegiance.CommunitySecuritySystem.DataAccess.CSSDataContext db, DataAccess.CSSStatsDataContext statsDB, Allegiance.CommunitySecuritySystem.Server.Data.GameDataset.GameRow gameRow, int gameIdentID)
        {
            foreach (Data.GameDataset.ChatLogRow chatLogRow in gameRow.GetChatLogRows())
            {
                DataAccess.GameChatLog chatLog = new Allegiance.CommunitySecuritySystem.DataAccess.GameChatLog()
                {
                    GameChatSpeakerName = TrimString(DataAccess.Alias.GetCallsignFromStringWithTokensAndTags(db, chatLogRow.SpeakerName), 49),
                    GameChatTargetName  = TrimString(DataAccess.Alias.GetCallsignFromStringWithTokensAndTags(db, chatLogRow.TargetName), 49),
                    GameChatText        = TrimString(chatLogRow.Text, 2063),
                    GameChatTime        = chatLogRow.ChatTime,
                    GameID = gameIdentID
                };

                statsDB.GameChatLogs.InsertOnSubmit(chatLog);
            }
        }
        private void SaveChatLog(Allegiance.CommunitySecuritySystem.DataAccess.CSSDataContext db, DataAccess.CSSStatsDataContext statsDB, Allegiance.CommunitySecuritySystem.Server.Data.GameDataset.GameRow gameRow, int gameIdentID)
        {
            foreach (Data.GameDataset.ChatLogRow chatLogRow in gameRow.GetChatLogRows())
            {
                DataAccess.GameChatLog chatLog = new Allegiance.CommunitySecuritySystem.DataAccess.GameChatLog()
                {
                    GameChatSpeakerName = TrimString(DataAccess.Alias.GetCallsignFromStringWithTokensAndTags(db, chatLogRow.SpeakerName), 49),
                    GameChatTargetName = TrimString(DataAccess.Alias.GetCallsignFromStringWithTokensAndTags(db, chatLogRow.TargetName), 49),
                    GameChatText = TrimString(chatLogRow.Text, 2063),
                    GameChatTime = chatLogRow.ChatTime,
                    GameID = gameIdentID
                };

                statsDB.GameChatLogs.InsertOnSubmit(chatLog);
            }
        }