private void WriteLog(VMGlobal.LOG_ACTION action, string memo) { try { AccountLog log = new AccountLog(); log.Action = action.ToString(); log.Memo = memo; using (RPM_Logs rpmLogs = new RPM_Logs()) rpmLogs.LogAccount(log); } catch { } }
private void WriteLog(VMGlobal.LOG_ACTION action, string memo, Guid Id) { if (Id != Guid.Empty) { DbSet <Account> accounts = context.Accounts; object[] id = new object[] { Id }; Account account = accounts.Find(id); memo = string.Concat(string.Format("{0} [{1}]\n", account.ToString(), account.BadgeNumber), memo); } AccountLog accountLog = new AccountLog() { Action = action.ToString(), Memo = memo }; using (RPM_Logs rPMLog = new RPM_Logs()) { rPMLog.LogAccount(accountLog); } }