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())); } }
public ShiftSignupTrade SaveTrade(ShiftSignupTrade trade) { _shiftSignupTradeRepository.SaveOrUpdate(trade); return(trade); }
public string GenerateShiftTradeNotificationText(UserProfile profile, ShiftSignupTrade trade) { return(string.Format("Shift Trade Request From {0} for {1}", profile.FullName.AsFirstNameLastName, trade.SourceShiftSignup.ShiftDay.ToShortDateString())); }
public string GenerateShiftTradeProposedText(UserProfile profile, ShiftSignupTrade trade) { return(string.Format("{0} Proposed Shift Trades for {1}", profile.FullName.AsFirstNameLastName, trade.SourceShiftSignup.ShiftDay.ToShortDateString())); }
public async Task <ShiftSignupTrade> SaveTradeAsync(ShiftSignupTrade trade, CancellationToken cancellationToken = default(CancellationToken)) { return(await _shiftSignupTradeRepository.SaveOrUpdateAsync(trade, cancellationToken)); }