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); } }
private void btnTransfer_Click(object sender, EventArgs e) { try { ProjectService.PrjAPIService local = new ProjectService.PrjAPIService(); local.Url = serviceUtil.getPpolURL() + "/cxf/PrjAPI"; ProjectService.prjTask inPrjTask = new ProjectService.prjTask(); inPrjTask.taskName = this.txtDesc.Text; int index = -1; int prjIndex = this.cbProjects.SelectedIndex; if (prjIndex < 1) { MessageBox.Show("A valid project need to be selected to transfer an email to a project task."); this.cbProjects.Focus(); } else { ProjectService.project proj = (ProjectService.project)prjList.list[prjIndex - 1]; inPrjTask.project = proj; index = this.cbPriority.SelectedIndex; if (index > 0) { ProjectService.prjTaskPriority selPriority = tskPriority[index - 1]; inPrjTask.priority = selPriority.key; // inPrjTask.fcABC = selPriority.key; } index = this.cbStatus.SelectedIndex; if (index > 0) { ProjectService.prjTaskStatus selStatus = tskStatus[index - 1]; inPrjTask.status = selStatus.key; // inPrjTask.fcStatus = selStatus.key; } index = this.cbOwner.SelectedIndex; if (index > 0) { UserGroupService.fwkUserEO selOwner = fwkUsers[index - 1]; inPrjTask.ownerId = selOwner.userId; } inPrjTask.startDate = this.dtpStart.Value.Month.ToString() + "/" + this.dtpStart.Value.Day.ToString() + "/" + this.dtpStart.Value.Year; inPrjTask.endDate = this.dtpDue.Value.Month.ToString() + "/" + this.dtpDue.Value.Day.ToString() + "/" + this.dtpDue.Value.Year; inPrjTask.desc = this.rtbDetail.Text; ProjectService.prjTask tsk = local.transferEmailAsTask(serviceUtil.getPpolAccount(), serviceUtil.getUserName(), serviceUtil.getPassword(), inPrjTask); MessageBox.Show("Email was transferred to task '" + tsk.taskName + "' successfully."); this.Close(); } } catch (Exception ex) { ClassFactory.Instance.ConnectionProblem(ex); } }
private void btnTransfer_Click(object sender, EventArgs e) { try { TaskService.TaskAPIService local = new TaskService.TaskAPIService(); local.Url = serviceUtil.getPpolURL() + "/cxf/TaskAPI"; TaskService.task inTask = new TaskService.task(); inTask.taskName = this.txtDesc.Text; int index = this.cbPriority.SelectedIndex - 1; if (index > 0) { TaskService.taskPriority selPriority = tskPriority[index]; inTask.taskPriority = selPriority.key; inTask.fcABC = selPriority.key; } index = this.cbStatus.SelectedIndex - 1; if (index > 0) { TaskService.taskStatus selStatus = tskStatus[index]; inTask.taskStatus = selStatus.key; inTask.fcStatus = selStatus.key; } index = this.cbOwner.SelectedIndex - 1; if (index > 0) { UserGroupService.fwkUserEO selOwner = fwkUsers[index]; inTask.ownerId = selOwner.userId; } inTask.dueDate = this.dtpDue.Value.Month.ToString() + "/" + this.dtpDue.Value.Day.ToString() + "/" + this.dtpDue.Value.Year; inTask.taskDetail = this.rtbDetail.Text; TaskService.task tsk = local.transferEmailAsTask(serviceUtil.getPpolAccount(), serviceUtil.getUserName(), serviceUtil.getPassword(), inTask); MessageBox.Show("Email was transferred to task '" + tsk.taskName + "' successfully."); this.Close(); } catch (Exception ex) { ClassFactory.Instance.ConnectionProblem(ex); } }
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); } }