Exemplo n.º 1
0
        public UserController(MaintainUsersForm child, int usrID, int profilePictureID)
        {
            userID = usrID;
            _user = new MUser(userID);
            picID = profilePictureID;
            _userForm = child;

            if (userID == 1)
            {
                _user.giveAdmin();
                _user.SetHQ(MFranchise.isFranchisor());
            }

            String[] loc = _user.GetLocation();
            if (loc[0] != "0")
                _userForm.InitializeCombos(loc[0], loc[1], loc[2]);
            else
            {
                String[] op = MFranchise.GetOpReg();
                _userForm.InitializeCombos(op[2], op[3], op[4]);
            }

            LoadUserPic();
            _userForm.SetButtons(_user.IsAdmin(), _user.IsHQ());
            _userForm.SetFields(_user.Get());
            /*try { _userForm.SetFields(_user.Get()); }
            catch (Exception) { MessageBox.Show("Failed to load User"); _userForm.Close(); }*/
        }
Exemplo n.º 2
0
        public UserController(MaintainUsersForm child, int usrID, int profilePictureID)
        {
            userID    = usrID;
            _user     = new MUser(userID);
            picID     = profilePictureID;
            _userForm = child;

            if (userID == 1)
            {
                _user.giveAdmin();
                _user.SetHQ(MFranchise.isFranchisor());
            }

            String[] loc = _user.GetLocation();
            if (loc[0] != "0")
            {
                _userForm.InitializeCombos(loc[0], loc[1], loc[2]);
            }
            else
            {
                String[] op = MFranchise.GetOpReg();
                _userForm.InitializeCombos(op[2], op[3], op[4]);
            }

            LoadUserPic();
            _userForm.SetButtons(_user.IsAdmin(), _user.IsHQ());
            _userForm.SetFields(_user.Get());

            /*try { _userForm.SetFields(_user.Get()); }
             * catch (Exception) { MessageBox.Show("Failed to load User"); _userForm.Close(); }*/
        }
Exemplo n.º 3
0
 private void userSettings_Click(object sender, EventArgs e)
 {
     MaintainUsersForm form = new MaintainUsersForm(userid, MUser.GetPicID(userid.ToString()));
     form.Show();
 }
Exemplo n.º 4
0
        private void userSettings_Click(object sender, EventArgs e)
        {
            MaintainUsersForm form = new MaintainUsersForm(userid, MUser.GetPicID(userid.ToString()));

            form.Show();
        }