public UpdateProfile(Administration a)
 {
     InitializeComponent();
     this.administration = a;
     tbAdress.Text = administration.MainAccountData(3);
     tbEmail.Text = administration.MainAccountData(8);
     tbName.Text = administration.MainAccountData(2);
     tbPhotoPath.Text = administration.MainAccountData(4);
     cbSex.SelectedItem = administration.MainAccountData(7);
 }
Example #2
0
        public HoofdForm(Administration a)
        {
            this.InitializeComponent();
            this.Administration = a;

            //Check if the user is a 'hulpverlener', which in that case, they should not be allowed to do as much as usual.
            if (this.Administration.MainAccountData(6) == "Hulpverlener")
            {
                tsbtnPlaceQuestion.Visible = false;
                tsbtnShowOwnRequests.Visible = false;
            }

            lblName.Text = a.MainAccountData(2);
            pbAvatar.ImageLocation = a.MainAccountData(4);
        }
Example #3
0
        public Afspraken(Administration a, bool loadMeeting)
        {
            this.InitializeComponent();
            administration = a;
            rtbInfo.Enabled = false;

            lblType.Text = loadMeeting ? "Afspraken:" : "Reviews";
            containsMeetings = loadMeeting;

            if (loadMeeting)
            {
                //Load meetings
                foreach (string s in administration.GetMainAccountMeetings())
                {
                    rtbInfo.Text += s + Environment.NewLine + Environment.NewLine;
                }
            }
            else
            {
                //If the logged in user is a 'hulpverlener', he wants to see the reviews posted to his account
                //If the logged in user is a 'hulpbehoevende', he wants to see the reviews he posted to people
                bool isPoster = administration.MainAccountData(6) == "Hulpverlener" ? false : true;
                foreach (string s in administration.GetAccountReviews(isPoster))
                {
                    rtbInfo.Text += s + Environment.NewLine + Environment.NewLine;
                }
            }
        }