private void setOMSUserContext(string userId)
        {
            OMSLogicalUserData userData = omsSessionContext.OMSUsersList[userId];

            omsSessionContext.LegalEntity      = userData.legalEntity;
            omsSessionContext.OrgUnit          = userData.orgUnit;
            omsSessionContext.OMSLogicalUserId = userData.omsLogicalUserId;
            omsSessionContext.OMSLoginUserId   = userData.omsLoginUserId;
            omsSessionContext.UserName         = userData.userName;
            omsSessionContext.WarehouseNumber  = userData.warehouseNumber;
            omsSessionContext.EmployNumber     = userData.employNumber;
        }
        private OMSUsersComboBoxData createComboBoxData(IList <string> userIdList)
        {
            OMSUsersComboBoxData cbData      = new OMSUsersComboBoxData();
            IList <OMSUser>      omsUserlist = new List <OMSUser>();

            foreach (string userId in userIdList)
            {
                OMSLogicalUserData userData = omsSessionContext.OMSUsersList[userId];
                OMSUser            omsUser  = new OMSUser();
                omsUser.UserId      = userId;
                omsUser.LegalEntity = userData.legalEntity.ToString();
                omsUser.WarehouseId = userData.warehouseNumber.ToString();
                omsUserlist.Add(omsUser);
            }
            OMSUserCollection uColl = new OMSUserCollection(omsUserlist);

            cbData.OMSUsers = uColl;
            return(cbData);
        }