Exemple #1
0
 private bool AddBug()
 {
     if (butAddViewBug.Text == "View Bug")
     {
         FormBugEdit formBE = new FormBugEdit();
         formBE.BugCur = _bug;
         formBE.ShowDialog();
         return(false);
     }
     _bug = BugSubmissionL.AddBug(_subCur, _jobCur);
     return(_bug == null);
 }
Exemple #2
0
        private void gridBugs_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormBugEdit FormBE = new FormBugEdit();

            FormBE.BugCur = Bugs.GetOne((long)gridBugs.Rows[e.Row].Tag);
            FormBE.ShowDialog();
            if (FormBE.BugCur == null)
            {
                _listJobLinks.RemoveAll(x => x.LinkType == JobLinkType.Bug && x.FKey == (long)gridBugs.Rows[e.Row].Tag);
            }
            FillGridBugs();
        }
        private void OpenBug(BugSubmission sub)
        {
            if (!JobPermissions.IsAuthorized(JobPerm.Concept, true) &&
                !JobPermissions.IsAuthorized(JobPerm.NotifyCustomer, true) &&
                !JobPermissions.IsAuthorized(JobPerm.FeatureManager, true) &&
                !JobPermissions.IsAuthorized(JobPerm.Documentation, true))
            {
                return;
            }
            FormBugEdit FormBE = new FormBugEdit();

            FormBE.BugCur = Bugs.GetOne(sub.BugId);
            if (FormBE.ShowDialog() == DialogResult.OK && FormBE.BugCur == null)         //Bug was deleted.
            {
                FillSubGrid(true);
            }
        }
Exemple #4
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            if (_isLoading)
            {
                return;
            }
            FormBugEdit FormBE = new FormBugEdit();

            FormBE.IsNew  = true;
            FormBE.BugCur = Bugs.GetNewBugForUser();
            if (_jobCur.Category == JobCategory.Enhancement)
            {
                FormBE.BugCur.Description = "(Enhancement)";
            }
            FormBE.BugCur.Description += _jobCur.Title;
            FormBE.ShowDialog();
            if (FormBE.DialogResult == DialogResult.OK)
            {
                BugCur       = FormBE.BugCur;
                DialogResult = DialogResult.OK;
            }
        }
Exemple #5
0
        ///<summary>Attempts to add a bug for the given sub and job.
        ///Job can be null, only used for pre appending "(Enhancement)" to bug description.
        ///Returns null if user canceled.</summary>
        public static Bug AddBug(BugSubmission sub, Job job = null)
        {
            FormBugEdit formBE;

            formBE = new FormBugEdit(new List <BugSubmission>()
            {
                sub
            });
            formBE.IsNew  = true;
            formBE.BugCur = Bugs.GetNewBugForUser();
            if (job != null && job.Category == JobCategory.Enhancement)
            {
                formBE.BugCur.Description = "(Enhancement)";
            }
            if (formBE.ShowDialog() != DialogResult.OK)
            {
                return(null);
            }
            BugSubmissions.UpdateBugIds(formBE.BugCur.BugId, new List <long> {
                sub.BugSubmissionNum
            });
            return(formBE.BugCur);
        }