private static void LogException(Exception exc) { string version = UpdatesChecker.CurrentAssemblyVersion.ToString(); NewIssueForm form = new NewIssueForm(); form.IssueText = string.Format("version: {0}{2}exception: {1} ", version, exc, Environment.NewLine); form.Show(); }
public ActionResult New(NewIssueForm form) { if (!ModelState.IsValid) { return View(form); } var assignedToUser = _context.Users.Project().To<ApplicationUser>().Single(u => u.Id == form.AssignedToUserName);//MattQuestion: Why is AssignedToUsername is an Id and not the UserName? _context.Issues.Add(new Issue(_currentUser.Me, assignedToUser, form.IssueType, form.Subject, form.Body)); _context.SaveChanges(); return RedirectToAction<HomeController>(c => c.Index()) .WithSuccess("Issue created!"); }
public ActionResult New() { var form = new NewIssueForm(); return View(form); }