private static string GetUrl(this Homework homework) { var prDataManager = MainRepository.Instance.PullRequestsDataManager; var prData = prDataManager.Get(pr => pr.HomeworkId == homework.Id); return(prData != null ? "<a style=\"display:block; width:100%;\" href =\"" + UrlGenerator.GetRouteUrl(HttpContext.Current.Request.RequestContext, "Index", "PullRequest", new { pullRequestDataId = prData.Id }) + "\">­</a>" : ""); }
public Button(RequestContext context, string text, string actionName, string controllerName) { Text = $"<button class = \"btn btn-outline - primary\"><a href = \"" + $"{UrlGenerator.GetRouteUrl(context, actionName, controllerName)}" + $"\">{text}</a></button> "; }