Beispiel #1
0
 public string GenerateShiftTradeFilledText(UserProfile tradeProfile, ShiftSignupTrade trade)
 {
     if (trade.TargetShiftSignup != null)
     {
         return(string.Format("{0} accepted trade {1} for {2}", tradeProfile.FullName.AsFirstNameLastName, trade.SourceShiftSignup.ShiftDay.ToShortDateString(), trade.TargetShiftSignup.ShiftDay.ToShortDateString()));
     }
     else
     {
         return(string.Format("{0} accepted you working {1}", tradeProfile.FullName.AsFirstNameLastName, trade.SourceShiftSignup.ShiftDay.ToShortDateString()));
     }
 }
Beispiel #2
0
        public ShiftSignupTrade SaveTrade(ShiftSignupTrade trade)
        {
            _shiftSignupTradeRepository.SaveOrUpdate(trade);

            return(trade);
        }
Beispiel #3
0
 public string GenerateShiftTradeNotificationText(UserProfile profile, ShiftSignupTrade trade)
 {
     return(string.Format("Shift Trade Request From {0} for {1}", profile.FullName.AsFirstNameLastName, trade.SourceShiftSignup.ShiftDay.ToShortDateString()));
 }
Beispiel #4
0
 public string GenerateShiftTradeProposedText(UserProfile profile, ShiftSignupTrade trade)
 {
     return(string.Format("{0} Proposed Shift Trades for {1}", profile.FullName.AsFirstNameLastName, trade.SourceShiftSignup.ShiftDay.ToShortDateString()));
 }
Beispiel #5
0
 public async Task <ShiftSignupTrade> SaveTradeAsync(ShiftSignupTrade trade, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await _shiftSignupTradeRepository.SaveOrUpdateAsync(trade, cancellationToken));
 }