Пример #1
0
        public ApplicationForm(Form _loginForm, Users.UserManagement _userMng, string mail)
        {
            InitializeComponent();
            loginForm = _loginForm;
            userMng   = _userMng;
            Users.User _user = userMng.FindUserByMail(mail);
            switch (_user.UserType)
            {
            case 0:     //admin
                currentUser = new Users.AdminUser();
                break;

            case 1:     //standart
                currentUser = new Users.StandartUser();
                break;

            case 2:     //part-time
                currentUser = new Users.ParttimeUser();
                break;
            }
            ShowHideComponents();
            currentUser.copyInfo(_user);
            remMng = new Reminder.ReminderManager(currentUser.UserID);
        }