public TaskEntry(string titel, string description, TaskPriority priority, DateTime startDate, DateTime deadlineDate) { Titel = titel; Description = description; Priority = priority.ToString(); StartDate = startDate; DeadlineDate = deadlineDate; CreatedDate = DateTime.Now; }
public string GetColour() { if (TaskPriority.ToString() == "Low") { return("#FFF9C12D"); } else if (TaskPriority.ToString() == "Medium") { return("#FFD1651A"); } else if (TaskPriority.ToString() == "High") { return("#FFB42222"); } else { return("White"); } }
public static MvcHtmlString Priority(this HtmlHelper html, TaskPriority priority) { string color; switch (priority) { case TaskPriority.High: color = "red"; break; case TaskPriority.Middle: color = "yellow"; break; default: color = "green"; break; } return(new MvcHtmlString(string.Format("<span class=\"fg-color-{0}\">{1}</span>", color, CustomTranslation.TaskPriority.ResourceManager.GetString(priority.ToString())))); }
public static TaskPriorityExt ConvertIntToExt(this TaskPriority taskPriority) { _ = Enum.TryParse(taskPriority.ToString(), out TaskPriorityExt convert); return(convert); }
public static IHtmlString TaskPriorityLabel(this System.Web.Mvc.HtmlHelper html, TaskPriority prio, string cssClass = "") { string labelClass = "label-success"; switch (prio) { case TaskPriority.Low: labelClass = "label-info"; break; case TaskPriority.High: labelClass = "label-warning"; break; case TaskPriority.Critical: labelClass = "label-danger"; break; } return(html.Raw(@"<span class=""label " + labelClass + " " + cssClass + @""">" + prio.ToString() + "</span>")); }
internal async Task ChangePriorityTaskNotificationAsync(Abstractions.Models.Task task, TaskPriority lastPriority) { var recipients = task.AssignedUsers.Select(s => s.UserId).ToList(); var taskUserRequest = await _identity.UserManager.FindByNameAsync(task.Author); if (taskUserRequest != null) { recipients.Add(taskUserRequest.Id.ToGuid()); } recipients = recipients.Distinct().ToList(); await _notify.SendNotificationAsync(recipients, new Notification { Content = string.Format(TaskChangePriority, task.TaskNumber, lastPriority.ToString(), task.TaskPriority.ToString(), task.Author), Subject = TaskTitle, NotificationTypeId = NotificationType.Info }); }