Exemplo n.º 1
0
        private void loadOwnerData()
        {
            try
            {
                UserGroupService.UserGroupAPIService local = new UserGroupService.UserGroupAPIService();
                local.Url = serviceUtil.getPpolURL() + "/cxf/UserGroupAPI";
                fwkUsers  = local.getUsersByGroup(serviceUtil.getPpolAccount(), serviceUtil.getUserName(), serviceUtil.getPassword(), -1);

                if (fwkUsers != null)
                {
                    this.cbOwner.Items.Add("");
                    for (int i = 0; i < fwkUsers.Length; i++)
                    {
                        UserGroupService.fwkUserEO user = fwkUsers[i];
                        if (user.userName == serviceUtil.getUserName())
                        {
                            ownerId = i + 1;
                        }
                        this.cbOwner.Items.Add(user.displayName);
                    }
                    this.cbOwner.SelectedIndex = ownerId;
                }
            }
            catch (Exception ex)
            {
                ClassFactory.Instance.ConnectionProblem(ex);
            }
        }
Exemplo n.º 2
0
        private void loadGroupUsers(int userGroupId)
        {
            try
            {
                try
                {
                    this.cbContactList.SelectedIndex = 0;
                    this.txtSrchUser.Text            = "";
                    this.txtSrcContact.Text          = "";
                }
                catch (Exception e1)
                {
                }
                this.listType = 1;
                UserGroupService.UserGroupAPIService local = new UserGroupService.UserGroupAPIService();
                local.Url = serviceUtil.getPpolURL() + "/cxf/UserGroupAPI";
                fwkUsers  = local.getUsersByGroup(serviceUtil.getPpolAccount(), serviceUtil.getUserName(), serviceUtil.getPassword(), userGroupId);
                this.grdUsers.Rows.Clear();
                if (fwkUsers != null)
                {
                    for (int i = 0; i < fwkUsers.Length; i++)
                    {
                        UserGroupService.fwkUserEO fwkUser = fwkUsers[i];

                        this.grdUsers.Rows.Add();
                        this.grdUsers.Rows[i].Cells[0].Value = false;
                        this.grdUsers.Rows[i].Cells[1].Value = fwkUser.displayName;
                        this.grdUsers.Rows[i].Cells[2].Value = fwkUser.emailAddress;
                    }
                }
            }
            catch (Exception ex)
            {
                ClassFactory.Instance.ConnectionProblem(ex);
            }
        }