Esempio n. 1
0
        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;
            }
        }
        private void btnlook_Click(object sender, EventArgs e)
        {
            User usr = new User();

            usr.authorized   = false;
            usr.id           = employeetable.Rows[listemployee.SelectedIndex].Field <UInt32>("Id");
            usr.scheduleid   = employeetable.Rows[listemployee.SelectedIndex].Field <UInt32>("ScheduleId");
            usr.username     = employeetable.Rows[listemployee.SelectedIndex].Field <string>("Name");
            usr.usersurname  = employeetable.Rows[listemployee.SelectedIndex].Field <string>("Surname");
            usr.userlastname = employeetable.Rows[listemployee.SelectedIndex].Field <string>("Lastname");
            win_user winusr = new win_user(usr, parental.useraccess);

            winusr.MdiParent = this.MdiParent;
            winusr.Show();
        }
Esempio n. 3
0
        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;
            }
        }