//salasanan vaihto public IActionResult Salismuokkaus(string username, string salasana) { var betterManager = new BetterAdManager(accountManagementConfig); string vastaus = betterManager.UpdateUserPassword(username, salasana); ViewData["utuja"] = vastaus; //onnistumis/virheviesti return(ViewComponent("Lisays")); }
//muuttaa käyttäjän etu -ja sukunimi tietoja public IActionResult OmatMuokkaus(string username, string fName, string lName) { var betterManager = new BetterAdManager(accountManagementConfig); string vastaus = betterManager.UpdateOwnAccount(username, fName, lName); ViewData["utuja"] = vastaus; //onnistumis/virheviesti return(ViewComponent("Lisays")); }
//muuttaa käyttäjän käyttäjänimen halutuksi public IActionResult Vaihda(string username, string newUsername) { var betterManager = new BetterAdManager(accountManagementConfig); string vastaus = betterManager.UpdateUserAccount(username, newUsername); ViewData["utuja"] = vastaus; //onnistumis/virheviesti return(ViewComponent("Lisays")); }
//luo yhden uuden käyttäjän public IActionResult Lisays(string Enimi, string Snimi, string Password, string Email, string EmployeeType) { var betterManager = new BetterAdManager(accountManagementConfig); string displayName = Enimi + Snimi; string vastaus = betterManager.CreateUserAccount(Enimi, Snimi, displayName, Password, Email, EmployeeType); ViewData["utuja"] = vastaus; //onnistumis/virheviesti return(ViewComponent("Lisays")); }
static void Main(string[] args) { Console.WriteLine("Hello Monday!"); Console.WriteLine("Search for username:"******"\nType new title for user:"******"User \"{username}\" was not found."); //} //adManager.Demo(username); // Console.WriteLine("\n\n\n"); var betterManager = new BetterAdManager(GetAMConfig()); //betterManager.Demo(username); var user = betterManager.FindUser(username); if (null != user) { Console.WriteLine(user.ToString()); // Console.WriteLine(user.ToString()); // Console.WriteLine("\nType new title for user:"******"User \"{username}\" was not found."); } #if DEBUG Console.WriteLine("Press any key to exit..."); Console.ReadKey(); #endif }
public IActionResult About() { var username = User.Identity.Name; username = username.Replace("CORE7\\", ""); var betterManager = new BetterAdManager(accountManagementConfig); var user = betterManager.FindUser(username); model.DisplayName = user.DisplayName; model.Email = user.Email; model.EmployeeType = user.EmployeeType; model.Title = user.Title; model.Username = user.Username; return(View(model)); }