예제 #1
0
 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);
 }
예제 #2
0
파일: ChatHub.cs 프로젝트: BNSStore/Website
        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();
        }
예제 #3
0
        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);
                }
            }
        }