public _AddLesson(DL.User user) { InitializeComponent(); _user = user; this.FormBorderStyle = FormBorderStyle.None; Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 35, 35)); }
public MainForm(DL.User user) { _user = user; Thread t = new Thread(new ThreadStart(StartForm)); t.Start(); Thread.Sleep(5000); InitializeComponent(); t.Abort(); }
public ActionResult Login(string username, string password) { try { DL.User u = loginFac.login(username, password); if (u != null) { string userRole = loginFac.getUserRole(u.UserID); setIdentityRole(username, userRole, u.UserID); Session.Add(ConstantFields.userSession, u); return(RedirectToAction("Index", "Home")); } } catch (Exception ex) { log.Error("Exception Login ", ex); } log.Error("Login failed for this user id " + username); this.AddNotification("Invalid username or password", NotificationType.ERROR); return(RedirectToAction("Index", "Login")); }