コード例 #1
0
        private static PwsGetTimeCardsRs GetExistingTimeCard(string sessionKey, PwsUserElement userDetails)
        {
            //Create timecard request
            PwsGetTimeCardsRq timeCardsRq = new PwsGetTimeCardsRq();

            timeCardsRq.SessionTicket    = sessionKey;
            timeCardsRq.StartDate        = DateTime.Parse("2019-04-24T00:00:00Z").ToUniversalTime();
            timeCardsRq.EndDate          = DateTime.Parse("2019-04-25T00:00:00Z").ToUniversalTime();
            timeCardsRq.ResourceIdentity = userDetails.ResourceIdentity;

            //Send request and check response status
            return(pwsProjectorServices.PwsGetTimeCards(timeCardsRq));
        }
コード例 #2
0
        private static PwsSaveTimeCardsRs SaveTimeCard(string sessionKey, PwsTimecardDetail timeCard, PwsUserElement userDetails)
        {
            PwsTimecardDetail[] timeCards   = { timeCard };
            PwsSaveTimeCardsRq  timeCardsRq = new PwsSaveTimeCardsRq();

            timeCardsRq.SessionTicket    = sessionKey;
            timeCardsRq.SaveTimeCards    = timeCards;
            timeCardsRq.ResourceIdentity = userDetails.ResourceIdentity;
            timeCardsRq.StartDate        = DateTime.Parse("2019-04-24T00:00:00Z").ToUniversalTime();
            timeCardsRq.EndDate          = DateTime.Parse("2019-04-25T00:00:00Z").ToUniversalTime();
            return(pwsProjectorServices.PwsSaveTimeCards(timeCardsRq));
        }