Exemplo n.º 1
0
        public static void Log(string actionDone, string applicationUserID)
        {
            LoggedAction action = new LoggedAction {
                ActionDone = actionDone, ApplicationUserID = applicationUserID
            };
            LoggedActionController newThing = new LoggedActionController();

            newThing.LogToDB(action);
        }
Exemplo n.º 2
0
 public ActionResult Create([Bind(Include = "projectTitle,projectType,reference,timeStamp,StageID,CompanyID,PersonID")] Project project)
 {
     if (ModelState.IsValid)
     {
         LoggedActionController.Log("Created Project" + project.projectTitle + "- " + project.ID, User.Identity.GetUserId());
         db.Projects.Add(project);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(project));
 }