public string GetDisplayName() { if (displayName == null) { SqlStoredProcedures sqlSP = new SqlStoredProcedures(); displayName = sqlSP.UserGetDisplayName(GetUserID()); } if (HasRole("Store.Employee") || HasRole("Store.Manager")) { return(GetFullName() + " (" + displayName + ") "); } return(displayName); }
public void LoggedIn() { SqlStoredProcedures sqlSP = new SqlStoredProcedures(); for (int i = chatLog.Count - 50 - 1 < 0 ? 0 : chatLog.Count - 50 - 1; i < chatLog.Count; i++) { Message message = chatLog[i]; string type = message.type; if (message.userID == onlineUsers[Context.ConnectionId]) { type = "self"; } Clients.Client(Context.ConnectionId).recieveMessage(sqlSP.UserGetDisplayName(message.userID), message.context, type, message.dateTime); } UpdateOnlineUserList(); }
public void Execute(IJobExecutionContext context) { SqlStoredProcedures sqlSP = new SqlStoredProcedures(); Dictionary <int, char> shifts = sqlSP.StoreGetNextShifts(); foreach (KeyValuePair <int, char> shift in shifts) { if (sqlSP.UserIsEmailSub(shift.Key) || sqlSP.StoreHasMissedShift(shift.Key)) { string displayName = sqlSP.UserGetDisplayName(shift.Key); string langName = sqlSP.LangGetLangName(sqlSP.UserGetMainLang(shift.Key)); string emailAddress = sqlSP.UserGetMainEmailAddress(shift.Key); Email.SendShiftNotificationEmail(emailAddress, displayName, shift.Value, langName); System.Diagnostics.Debug.WriteLine("Sent shift notification to " + displayName + " at " + emailAddress); } } }