Esempio n. 1
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            if (_viewMode == FormBugSubmissionMode.SelectionMode)           //Text is set to "Ok" when SelectionMode
            {
                ListSelectedSubs = gridSubs.SelectedIndices.SelectMany(x => (List <BugSubmission>)gridSubs.ListGridRows[x].Tag).ToList();
                DialogResult     = DialogResult.OK;
                return;
            }
            if (_viewMode == FormBugSubmissionMode.ValidationMode)           //Text is set to "Ok" when SelectionMode
            {
                ListSelectedSubs = _listAllSubs;
                DialogResult     = DialogResult.OK;
                return;
            }
            if (butAddJob.Text == "View Job" && butAddJob.Tag is JobLink)           //Assocaited to job, see gridSubs_CellClick(...)
            {
                FormOpenDental.S_GoToJob((butAddJob.Tag as JobLink).JobNum);
                return;
            }
            List <BugSubmission> listSelectedSubs = gridSubs.SelectedIndices.SelectMany(x => (List <BugSubmission>)gridSubs.ListGridRows[x].Tag).ToList();

            BugCur = BugSubmissionL.AddBugAndJob(this, listSelectedSubs, _patCur);
            if (BugCur == null)
            {
                return;
            }
            if (this.Modal)
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                FillSubGrid(true);
            }
        }
Esempio n. 2
0
 private void butAddViewJob_Click(object sender, EventArgs e)
 {
     if (_patCur == null)
     {
         return;
     }
     if (_listLinks.Count > 0)           //View Job
     {
         if (_listLinks.Count == 1)
         {
             JobLink link = _listLinks.First();
             FormOpenDental.S_GoToJob(link.JobNum);
         }
         else
         {
             MsgBox.Show(this, "Submission is associated to multiple jobs");
         }
         return;
     }
     _bug = BugSubmissionL.AddBugAndJob(this, new List <BugSubmission>()
     {
         _subCur
     }, _patCur);
     if (_bug == null)
     {
         return;
     }
     if (this.Modal)
     {
         DialogResult = DialogResult.OK;
     }
 }
Esempio n. 3
0
        private bool PassesFilterValidation(BugSubmission sub, List <string> listCategoryFilters, List <string> listSelectedPatNames,
                                            List <string> listStackFilters, List <string> listPatNumFilters, List <string> listSelectedVersions, string grouping95, string msgText,
                                            string devNoteFilter, DateTime dateTimeFrom, DateTime dateTimeTo)
        {
            bool hasMobileSelected   = listSelectedVersions.Count(x => x == "Mobile") != 0;
            bool hasVersionsSelected = listSelectedVersions.Count(x => x != "Mobile") != 0;

            if (_viewMode != FormBugSubmissionMode.ValidationMode &&
                ((!string.IsNullOrWhiteSpace(msgText) && !sub.ExceptionMessageText.ToLower().Contains(msgText.ToLower())) ||
                 (listSelectedPatNames.Count != 0 && !listSelectedPatNames.Contains(_dictPatients.ContainsKey(sub.RegKey)?_dictPatients[sub.RegKey].GetNameLF():sub.RegKey)) ||
                 (listStackFilters.Count != 0 && !listStackFilters.Exists(x => sub.ExceptionStackTrace.ToLower().Contains(x))) ||
                 (listPatNumFilters.Count != 0 && (!_dictPatients.ContainsKey(sub.RegKey) || !listPatNumFilters.Exists(x => x == _dictPatients[sub.RegKey].PatNum.ToString()))) ||
                 (sub.BugId != 0 && !listShowHideOptions.GetSelected(1)) ||
                 (!listShowHideOptions.GetSelected(0) && _dictPatients.ContainsKey(sub.RegKey) && (_dictPatients[sub.RegKey].BillingType == 436 || _dictPatients[sub.RegKey].PatNum == 1486)) ||                //436 is "Internal Use" def, 1486 is HQ patNum.
                 (hasVersionsSelected && !sub.IsMobileSubmission && !listSelectedVersions.Contains(sub.ProgramVersion.SubstringBefore('.', 2))) ||
                 (hasMobileSelected && !hasVersionsSelected && !sub.IsMobileSubmission) ||
                 (!hasMobileSelected && sub.IsMobileSubmission) ||
                 (!sub.SubmissionDateTime.Between(dateTimeFrom, dateTimeTo)) ||
                 (!string.IsNullOrWhiteSpace(devNoteFilter) && !sub.DevNote.ToLower().Contains(devNoteFilter.ToLower())) ||
                 (!string.IsNullOrEmpty(grouping95) && BugSubmissionL.CalculateSimilarity(grouping95, sub.ExceptionStackTrace) < 95)) ||
                (!listShowHideOptions.GetSelected(2) && sub.IsHidden) ||
                (listCategoryFilters.Count > 0 && listCategoryFilters.All(x => !sub.ListCategoryTags.Any(y => y.ToLower().Contains(x.ToLower())))))
            {
                return(false);
            }
            return(true);
        }
Esempio n. 4
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            if (_viewMode == FormBugSubmissionMode.SelectionMode)           //Text is set to "Ok" when SelectionMode
            {
                ListSelectedSubs = gridSubs.SelectedIndices.SelectMany(x => (List <BugSubmission>)gridSubs.Rows[x].Tag).ToList();
                DialogResult     = DialogResult.OK;
                return;
            }
            if (_viewMode == FormBugSubmissionMode.ValidationMode)           //Text is set to "Ok" when SelectionMode
            {
                ListSelectedSubs = _listAllSubs;
                DialogResult     = DialogResult.OK;
                return;
            }
            List <BugSubmission> listSelectedSubs = gridSubs.SelectedIndices.SelectMany(x => (List <BugSubmission>)gridSubs.Rows[x].Tag).ToList();

            BugCur = BugSubmissionL.AddBugAndJob(this, listSelectedSubs, _patCur);
            if (BugCur == null)
            {
                return;
            }
            if (this.Modal)
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                FillSubGrid(true);
            }
        }
Esempio n. 5
0
        private void butBugTask_Click(object sender, EventArgs e)
        {
            //Button is only enabled if _patCur is not null (user has 1 row selected).
            BugSubmission sub = gridSubs.SelectedIndices.SelectMany(x => (List <BugSubmission>)gridSubs.Rows[x].Tag).First();

            BugSubmissionL.CreateTask(_patCur, sub);
        }
Esempio n. 6
0
 private void matchHiddenSubmissionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!BugSubmissionL.HideMatchedBugSubmissions())
     {
         return;
     }
     FillSubGrid(true);
 }
Esempio n. 7
0
 private void findPreviouslyFixedSubmisisonsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!BugSubmissionL.TryAssociateSimilarBugSubmissions(_listAllSubs, this.Location))
     {
         return;
     }
     FillSubGrid();
 }
Esempio n. 8
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);
 }
Esempio n. 9
0
 private bool PassesFilterValidation(BugSubmission sub, List <string> listSelectedRegKeys,
                                     List <string> listStackFilters, List <string> listPatNumFilters, List <string> listSelectedVersions, string grouping95)
 {
     if (!_viewMode.In(FormBugSubmissionMode.ValidationMode, FormBugSubmissionMode.ViewOnly) &&
         ((!string.IsNullOrWhiteSpace(textMsgText.Text) && !sub.ExceptionMessageText.ToLower().Contains(textMsgText.Text.ToLower())) ||
          (listSelectedRegKeys.Count != 0 && !listSelectedRegKeys.Contains(sub.RegKey)) ||
          (listStackFilters.Count != 0 && !listStackFilters.Exists(x => sub.ExceptionStackTrace.ToLower().Contains(x))) ||
          (listPatNumFilters.Count != 0 && !listPatNumFilters.Exists(x => x == _dictPatients[sub.RegKey].PatNum.ToString())) ||
          (sub.BugId != 0 && !checkShowAttached.Checked) ||
          (checkExcludeHQ.Checked && (_dictPatients[sub.RegKey].BillingType == 436 || _dictPatients[sub.RegKey].PatNum == 1486)) ||                //436 is "Internal Use" def, 1486 is HQ patNum.
          (listSelectedVersions.Count != 0 && !listSelectedVersions.Contains(sub.Info.DictPrefValues[PrefName.ProgramVersion])) ||
          (!sub.SubmissionDateTime.Between(dateRangePicker.GetDateTimeFrom(), dateRangePicker.GetDateTimeTo())) ||
          (!string.IsNullOrWhiteSpace(textDevNoteFilter.Text) && !sub.DevNote.ToLower().Contains(textDevNoteFilter.Text.ToLower())) ||
          (!string.IsNullOrEmpty(grouping95) && BugSubmissionL.CalculateSimilarity(grouping95, sub.ExceptionStackTrace) < 95)))
     {
         return(false);
     }
     return(true);
 }
Esempio n. 10
0
 private void butBugTask_Click(object sender, EventArgs e)
 {
     BugSubmissionL.CreateTask(_patCur, _sub);
 }