示例#1
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));
        }