public static void WriteSystemLog(VMGlobal.LOG_ACTION action, string memo, Guid Id) { using (RPM_Logs rpmLogs = new RPM_Logs()) rpmLogs.LogSystem(new SystemLog() { Action = action.ToString(), Memo = memo }); }
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 { } }
public static void WriteAccountLog(VMGlobal.LOG_ACTION action, string memo, Guid Id) { if (Id != Guid.Empty) { using (RPM_Account rpmAccount = new RPM_Account()) { Account account = rpmAccount.GetAccount(Id); memo = string.Format("{0} [{1}]\n", account.ToString(), account.BadgeNumber) + memo; } } AccountLog log = new AccountLog(); log.Action = action.ToString(); log.Memo = memo; using (RPM_Logs rpmLogs = new RPM_Logs()) rpmLogs.LogAccount(log); }
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); } }