Exemplo n.º 1
0
        public profileForm LoadProfile(uid uid)
        {
            profileForm profForm = new profileForm();

            profForm.fields = new formField[1];

            formField usernameField = new formField();

            usernameField.name       = "username";
            usernameField.mandatory  = true;
            usernameField.@readonly  = true;
            usernameField.searchable = true;
            usernameField.hidden     = false;
            usernameField.type       = "STRING";
            usernameField.sequence   = 1;

            switch (uid.account_id)
            {
            case "1":
                usernameField.value = "test";
                break;

            case "2":
                usernameField.value = "test1";
                break;

            default:
                usernameField.value = "";
                break;
            }

            profForm.fields[0] = usernameField;

            return(profForm);
        }
Exemplo n.º 2
0
        public registrationForm GetRegistrationForm()
        {
            registrationForm regForm = new registrationForm();

            regForm.fields = new formField[1];

            formField usernameField = new formField();

            usernameField.name       = "username";
            usernameField.mandatory  = true;
            usernameField.@readonly  = true;
            usernameField.searchable = true;
            usernameField.hidden     = false;
            usernameField.type       = "STRING";
            usernameField.sequence   = 1;

            regForm.fields[0] = usernameField;


            return(regForm);
        }