Exemplo n.º 1
0
        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 }) + "\">&shy;</a>"
                : "");
        }
Exemplo n.º 2
0
 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> ";
 }