Пример #1
0
        public FormUserDetails(string adminID, string firstName)
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            this.adminID       = adminID;
            details            = connect.findUserByFirstName(firstName);
            items = details.Split(';');

            userID         = items[0];
            this.firstName = items[1];
            lastName       = items[2];
            age            = items[3];
            email          = items[4];
            userRole       = items[5];
            active         = items[6];
            street         = items[7];
            streetNumber   = items[8];
            postalCode     = items[9];
            city           = items[10];
            country        = items[11];
            telephone      = items[12];

            ID.Text           = userID;
            FirstName.Text    = this.firstName;
            LastName.Text     = lastName;
            Age.Text          = age;
            Email.Text        = email;
            UserRole.Text     = userRole;
            Active.Text       = active;
            Street.Text       = street;
            StreetNumber.Text = streetNumber;
            PostalCode.Text   = postalCode;
            City.Text         = city;
            Country.Text      = country;
            Telephone.Text    = telephone;

            ID.Enabled  = false;
            Age.Enabled = false;
        }