private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); frmMain frm = new frmMain(); frm.ShowDialog(); this.Close(); frmMain_Load(sender, e); }
private void frmMain_Load(object sender, System.EventArgs e) { frmMain _frmMain = new frmMain(); Account.frmLogin frm = new Account.frmLogin(_frmMain); frm.ShowDialog(); lblProfileType.Text = "You are logged in as: " + ProfileType + "!"; String s = ProfileType; String userType; if (String.IsNullOrEmpty(s)) { userType = ""; } else { userType = string.Concat(s.TakeWhile((c) => c != ' ')); } //MessageBox.Show("Role: " + userType); routeRequest(userType); }