Beispiel #1
0
        ///<summary>Gets the set printer whether or not it is valid.  Returns null if the current computer OR printer cannot be found.</summary>
        public static Printer GetForSit(PrintSituation sit)
        {
            //No need to check RemotingRole; no call to db.
            Computer compCur = Computers.GetCur();

            if (compCur == null)
            {
                return(null);
            }
            return(GetFirstOrDefault(x => x.ComputerNum == compCur.ComputerNum && x.PrintSit == sit));
        }
Beispiel #2
0
        ///<summary>Gets the set printer whether or not it is valid.</summary>
        public static Printer GetForSit(PrintSituation sit)
        {
            //No need to check RemotingRole; no call to db.
            if (list == null)
            {
                RefreshCache();
            }
            Computer compCur = Computers.GetCur();

            for (int i = 0; i < list.Length; i++)
            {
                if (list[i].ComputerNum == compCur.ComputerNum &&
                    list[i].PrintSit == sit)
                {
                    return(list[i]);
                }
            }
            return(null);
        }