Ejemplo n.º 1
0
        private PwsResourceElement[] GetProjectorResource(List <Person> person, string sessionTicket)
        {
            PwsResourceRef[] userList = new PwsResourceRef[person.Count];
            for (int i = 0; i < person.Count; i++)
            {
                userList[i] = new PwsResourceRef()
                {
                    ResourceDisplayName = person[i].Name
                };
            }
            PwsGetResourceRq getResourceRq = new PwsGetResourceRq()
            {
                SessionTicket      = sessionTicket,
                ResourceIdentities = userList
            };

            return(pwsProjectorServices.PwsGetResource(getResourceRq).Resources);
        }
Ejemplo n.º 2
0
        private PwsSaveTimeCardsRs SaveTimeCards(PwsTimecardDetail[] timeCards, PwsTimeOffCardDetail[] timeOffCards, PwsResourceRef user, string sessionTicket)
        {
            PwsSaveTimeCardsRq saveTimeCardsRq = new PwsSaveTimeCardsRq();

            saveTimeCardsRq.SessionTicket    = sessionTicket;
            saveTimeCardsRq.StartDate        = DateTime.Now; // Time details need sorted
            saveTimeCardsRq.EndDate          = DateTime.Now; // As above
            saveTimeCardsRq.ResourceIdentity = user;
            if (timeCards.Length > 0)
            {
                saveTimeCardsRq.SaveTimeCards = timeCards;
            }
            if (timeOffCards.Length > 0)
            {
                saveTimeCardsRq.SaveTimeOffCards = timeOffCards;
            }
            return(pwsProjectorServices.PwsSaveTimeCards(saveTimeCardsRq));
        }