Exemple #1
0
        private void InitializeScreen()
        {
            // Load lookup combobox data.
            LookupData();

            // Binding event to control.
            txtUserAccount.KeyPress        += CtrlUtil.SetNextControl;
            txtUsername.KeyPress           += CtrlUtil.SetNextControl;
            cboDefaultDateFormat.KeyPress  += CtrlUtil.SetNextControl;
            cboDefaultLang.KeyPress        += CtrlUtil.SetNextControl;
            txtCurrentPassword.KeyPress    += CtrlUtil.SetNextControl;
            txtNewPassword.KeyPress        += CtrlUtil.SetNextControl;
            txtConfirmNewPassword.KeyPress += CtrlUtil.SetNextControl;


            // Binding Model
            dmcUserProfile.AddRangeControl(
                txtUserAccount,
                txtUsername,
                txtNewPassword,
                txtConfirmNewPassword,
                cboDefaultDateFormat,
                cboDefaultLang,
                txtCurrentPassword
                );

            Map <string, object> mapData   = m_prcUserProfile.LoadUserProfile(Common.CurrentUserInfomation.UserCD);
            UserProfileUIDM      dataModel = mapData.ExtractValue <UserProfileUIDM>(UserProfileController.C_VAL_MODEL);

            dmcUserProfile.LoadData(dataModel);

            // Startup Enable/Disable control.
            CtrlUtil.EnabledControl(false, txtUserAccount);
            CtrlUtil.EnabledControl(true, txtUsername, txtNewPassword, txtConfirmNewPassword, cboDefaultDateFormat, cboDefaultLang, txtCurrentPassword);
        }