public static string ToCss(this UserStateTypes type) { switch (type) { case UserStateTypes.Available: return(""); case UserStateTypes.Delayed: return("label-warning"); case UserStateTypes.Unavailable: return("label-important"); case UserStateTypes.Committed: return("label-info"); default: return(""); } }
public async Task <IActionResult> SetStateForUser(string userId, UserStateTypes stateType) { await _userStateService.CreateUserState(userId, DepartmentId, (int)stateType); return(RedirectToAction("Dashboard", "Home", new { area = "User" })); }