Пример #1
0
 private void comboJiraTask_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboJiraTask.Items.Contains((sender as ComboBox).Text))
     {
         this.txtComments.Text = JiraInterface.GetJiraInfo((sender as ComboBox).Text).Summary;
     }
 }
Пример #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.ValidateInput())
     {
         if (this.workLog.TaskID.Length > 0 && this.workLog.WorkLogID.Length > 0 && this.workLog.TaskID != this.comboJiraTask.Text)
         {
             JiraInterface.DeleteWorkLog(this.workLog.TaskID, this.workLog.WorkLogID);
         }
         this.DialogResult = System.Windows.Forms.DialogResult.OK;
         this.Close();
     }
 }
Пример #3
0
 public void DeleteJira()
 {
     if (this.WorkLog.WorkLogID.Length > 0)
     {
         try
         {
             JiraInterface.DeleteWorkLog(this.WorkLog.TaskID, this.WorkLog.WorkLogID);
         }
         catch
         {
             System.Windows.Forms.MessageBox.Show("There was an error when deleteing the work log. Continuing anyway.", "Error Deleting Work Log!", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
         }
     }
 }
Пример #4
0
        public void UpdateJira()
        {
            if (this.WorkLog.TaskID.Length > 0 && this.Stop != MIN_DATE)
            {
                this.WorkLog  = JiraInterface.UpdateWork(this.WorkLog, this.Start, this.Stop);
                this.Comments = this.WorkLog.Summary;
            }
            else if (this.WorkLog.TaskID.Length > 0)
            {
                this.WorkLog = JiraInterface.UpdateJiraInfo(this.WorkLog);
            }

            if (this.WorkLog.Summary.Trim().Length > 0)
            {
                this.Comments = this.WorkLog.Summary;
            }
        }
Пример #5
0
        private void frmTimeEntry_Load(object sender, EventArgs e)
        {
            comboProject.Items.AddRange(Settings.CurrentSettings.Projects.ToArray());
            if (comboProject.Text.Trim().Length == 0 && comboProject.Items.Count > 0)
                comboProject.SelectedItem = comboProject.Items[0];

            comboTask.Items.AddRange(Settings.CurrentSettings.Tasks.ToArray());
            if (comboTask.Text.Trim().Length == 0 && comboTask.Items.Count > 0)
                comboTask.SelectedItem = comboTask.Items[0];

            comboEmployer.Items.AddRange(Settings.CurrentSettings.Employers.ToArray());
            if (comboEmployer.Text.Trim().Length == 0 && comboEmployer.Items.Count > 0)
                comboEmployer.SelectedItem = comboEmployer.Items[0];

            comboJiraTask.Items.AddRange(JiraInterface.GetJiraTaskIDs().ToArray());
            //if (comboJiraTask.Text.Trim().Length == 0 && comboJiraTask.Items.Count > 0)
            //    comboJiraTask.SelectedItem = comboJiraTask.Items[0];
        }
Пример #6
0
 public TimeEntry(string Project, string Task, string Employer, DateTime Start, DateTime Stop, string Comments, string JiraID)
     : this(Project, Task, Employer, Start, MIN_DATE, Comments, JiraInterface.GetJiraInfo(JiraID))
 {
 }