private void getProjectData() { try { ProjectService.PrjAPIService local = new ProjectService.PrjAPIService(); local.Url = serviceUtil.getPpolURL() + "/cxf/PrjAPI"; prjList = local.getAllProjects(serviceUtil.getPpolAccount(), serviceUtil.getUserName(), serviceUtil.getPassword()); if (prjList == null || prjList.list.Length == 0) { MessageBox.Show("Projects are not found in your PlanPlus Online account."); } else { this.grdProjects.Rows.Clear(); for (int i = 0; i < prjList.list.Length; i++) { ProjectService.project project = (ProjectService.project)prjList.list[i]; this.grdProjects.Rows.Add(); this.grdProjects.Rows[i].Cells[0].Value = project.projectId; this.grdProjects.Rows[i].Cells[1].Value = project.projectName; this.grdProjects.Rows[i].Cells[2].Value = project.description; } } } catch (Exception ex) { ClassFactory.Instance.ConnectionProblem(ex); } }
private void getProjectData() { try { ProjectService.PrjAPIService local = new ProjectService.PrjAPIService(); local.Url = serviceUtil.getPpolURL() + "/cxf/PrjAPI"; prjList = local.getAllProjects(serviceUtil.getPpolAccount(), serviceUtil.getUserName(), serviceUtil.getPassword()); if (prjList == null || prjList.list.Length == 0) { this.cbProjects.Items.Add("Projects are not found in your PlanPlus Online account."); } else { this.cbProjects.Items.Add(""); for (int i = 0; i < prjList.list.Length; i++) { ProjectService.project project = (ProjectService.project)prjList.list[i]; this.cbProjects.Items.Add(project.projectId + "-" + project.projectName); } } } 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 btnSubmit_Click(object sender, EventArgs e) { try { if (this.grdProjects.SelectedRows.Count > 0 && this.grdProjects.SelectedRows[0].Index != this.grdProjects.Rows.Count - 1) { int rowSelected = this.grdProjects.SelectedRows[0].Index; DataGridViewRow gridViewRow = this.grdProjects.Rows[rowSelected]; DataGridViewCell gridViewCell = gridViewRow.Cells[0]; int cellValue = (int)gridViewCell.Value; //Microsoft.Office.Interop.Outlook.MailItem mItem = // (Microsoft.Office.Interop.Outlook.MailItem)Globals.ThisAddIn.Application.ActiveInspector().CurrentItem; ProjectService.PrjAPIService local = new ProjectService.PrjAPIService(); local.Url = serviceUtil.getPpolURL() + "/cxf/PrjAPI"; ProjectService.message msg = new ProjectService.message(); using (var mItem = ClassFactory.Instance.Outlook.GetCurrentInspectorItem()) { if (mItem != null) { msg.date = mItem.SentOn.ToLongDateString(); msg.subject = mItem.Subject; msg.content = mItem.HTMLBody; } } ProjectService.project prj = (ProjectService.project)prjList.list[rowSelected]; ProjectService.project rtnPrj = local.attachEmailAsNote(serviceUtil.getPpolAccount(), serviceUtil.getUserName(), serviceUtil.getPassword(), prj, msg); MessageBox.Show(String.Format("Attached email as note to the project: " + cellValue + "-" + (string)gridViewRow.Cells[1].Value)); this.Close(); } else { MessageBox.Show("Select an project to attach"); } } catch (Exception ex) { ClassFactory.Instance.ConnectionProblem(ex); } }
public project attachEmailAsNote([System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg0, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg1, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg2, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] project arg3, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] message arg4) { object[] results = this.Invoke("attachEmailAsNote", new object[] { arg0, arg1, arg2, arg3, arg4 }); return((project)(results[0])); }
/// <remarks/> public void attachEmailAsNoteAsync(string arg0, string arg1, string arg2, project arg3, message arg4) { this.attachEmailAsNoteAsync(arg0, arg1, arg2, arg3, arg4, null); }