Esempio n. 1
0
 public ActionResult AddUser()
 {
     var users = new UserViewModel();
     users.Users = UserDetails.get();
     ViewBag.Title = "User Details";
        string json = JsonConvert.SerializeObject(users.Users);
         System.IO.File.WriteAllText(@"f:\UI\LeecherReg\Settings\settings.json", json);
     return View(users);
 }
Esempio n. 2
0
 public ActionResult AddUser(UserViewModel details)
 {
     if (ModelState.IsValid)
     {
         var users = new UserViewModel();
         users.Users = UserDetails.get();
         users.Users.Add(new UserDetails() { Email = details.Userdetails.Email, Username = details.Userdetails.Username });
         return View(users);
     }
     else {
         ViewBag.success = false;
         return View(details);
     }
 }