public void AddExportIssue(ExportIssue exportIssue, int concernId, int userId) { exportIssue.ConcernId = concernId; exportIssue.CreationDate = DateTime.Now; exportIssue.Creator = userId; _context.ExportIssues.Add(exportIssue); _context.SaveChanges(); }
public ActionResult AddExportIssue(ExportIssue exportIssue) { var concernId = Convert.ToInt32(Session["ConcernId"]); var userId = Convert.ToInt32(Session["UserId"]); if (concernId > 0 && userId > 0) { _permess.AddExportIssue(exportIssue, concernId, userId); return(RedirectToAction(nameof(ExportIssue))); } return(RedirectToAction("LogIn", "GlobalData", new { Area = "Global" })); }