Example #1
0
 public ActionResult AddCollaborator(CollaboratorVM col)
 {
     if (ModelState.IsValid)
     {
         var collaborator = new Collaborator()
         {
             CreationDate = System.DateTime.Now,
             FirstName    = col.FirstName,
             LastName     = col.LastName,
             Institution  = col.Institution,
         };
         if (col.Title != null)
         {
             collaborator.Title = col.Title.ToString();
         }
         Services.UserService.AddCollaborator(collaborator);
     }
     return(RedirectToAction("Dashboard"));
 }
Example #2
0
        public ActionResult AddCollaborator()
        {
            var collaborator = new CollaboratorVM();

            return(View(collaborator));
        }