private void beginworkintoolmenu_Click(object sender, EventArgs e) { switch (user.useraccess) { case 1: win_user win_usr = new win_user(this.user, this.user.useraccess); win_usr.MdiParent = this; win_usr.Show(); break; case 2: win_admin win_adm = new win_admin(this.user); win_adm.MdiParent = this; win_adm.Show(); break; } }
public void authorize() { this.Text = "ИС Учёт Времени [" + user.usersurname + " " + user.username + " " + user.userlastname + "]"; if (user.statusid == 1) { this.Text += " [Неактивен]"; } notify.Text = notify.BalloonTipTitle = this.Text; beginworkintoolmenu.Enabled = true; switch (user.useraccess) { case 1: win_user win_usr = new win_user(this.user, this.user.useraccess); win_usr.MdiParent = this; win_usr.Show(); break; case 2: win_admin win_adm = new win_admin(this.user); win_adm.MdiParent = this; win_adm.Show(); break; } }