Exemple #1
0
        public void SearchDoc(Form f, atLogic.WhereClause wc, fAdvancedSearch referrer, string fullText, bool includeXrefs, string formName, bool opinionsOnly)
        {
            Init(referrer, fullText);
            fProgress.setMessageText(LawMate.Properties.Resources.RetrievingDataMessage);
            if (wc == null)
            {
                dm.GetDocument().Search(fullText, opinionsOnly);
            }
            else
            {
                dm.GetDocument().Search(wc, includeXrefs);    //.GetGeneralRec("select v.* from vefile v inner join efile f on v.fileid=f.fileid " + wc.Clause());
            }

            //InitDT(dm.DB.Document);
            if (formName != null)
            {
                this.Text = formName;
            }

            if (this.Visible)
            {
                InitDT(dm.DB.Document);
                //if (formName != null)
                //    this.Text = formName;
                fProgress.resetForm();
            }
        }
Exemple #2
0
        private void Init(fAdvancedSearch referrer, string fullText)
        {
            LoadLabels();
            dm = this.AtMng.GetFile().GetDocMng();
            //ucDoc1.Init(dm);
            //ucDoc1.ReturnFocusTo = ucRecordList1;
            ucDocView1.Init(dm);
            ucDocView1.ReturnFocusTo = ucRecordList1;

            fProgress = MainForm.FProgress;
            if (referrer != null)
            {
                myfAS = referrer;
            }
            else
            {
                tsReviseSearchCriteria.Visible = Janus.Windows.UI.InheritableBoolean.False;
            }

            //ucDoc1.Clear();
            ucDocView1.Clear();

            if (fullText != "")
            {
                FullText = fullText;
                tbFullTextCriteriaRO.Text = fullText;
                this.Text += " [" + fullText + "]";

                //pnlLeft.Closed = false;
                pnlLeft.Closed      = true;
                tsHitHilite.Visible = Janus.Windows.UI.InheritableBoolean.False;

                tsPreview1.Visible  = Janus.Windows.UI.InheritableBoolean.False;
                IsFullTextSearch    = true;
                tsHitHilite.Checked = Janus.Windows.UI.InheritableBoolean.True;

                cmdPrevHit.Visible         = Janus.Windows.UI.InheritableBoolean.True;
                cmdNextHit.Visible         = Janus.Windows.UI.InheritableBoolean.True;
                cmdFirstHit.Visible        = Janus.Windows.UI.InheritableBoolean.True;
                cmdLastHit.Visible         = Janus.Windows.UI.InheritableBoolean.True;
                cmdToggleHighlight.Visible = Janus.Windows.UI.InheritableBoolean.True;
                SetPreview(true);
            }
            else
            {
                tsHitHilite.Visible        = Janus.Windows.UI.InheritableBoolean.False;
                pnlLeft.Closed             = true;
                cmdPrevHit.Visible         = Janus.Windows.UI.InheritableBoolean.False;
                cmdNextHit.Visible         = Janus.Windows.UI.InheritableBoolean.False;
                cmdFirstHit.Visible        = Janus.Windows.UI.InheritableBoolean.False;
                cmdLastHit.Visible         = Janus.Windows.UI.InheritableBoolean.False;
                cmdToggleHighlight.Visible = Janus.Windows.UI.InheritableBoolean.False;
            }
        }
Exemple #3
0
        public fSearchResults(Form f, atLogic.WhereClause wc, atLogic.WhereClause wcContact, atLogic.WhereClause wcCaseStatus, fAdvancedSearch referrer, bool includeXrefs)
            : base(f)
        {
            InitializeComponent();
            HookupfProgress((fMain)f);
            LoadLabels();

            if (referrer == null) //quicksearch
            {
                tsReviseSearchCriteria.Visible = Janus.Windows.UI.InheritableBoolean.False;
            }
            else //advanced search
            {
                formTitle           = LawMate.Properties.Resources.AdvancedSearchResults;
                myfAS               = referrer;
                this.Text           = formTitle;
                tsScreenTitle2.Text = formTitle;
            }
            System.Diagnostics.Trace.WriteLine("searchadv", "start");

            //.GetGeneralRec("select v.* from vefile v inner join efile f on v.fileid=f.fileid " + wc.Clause());
            System.Diagnostics.Trace.WriteLine("searchadv", "bind");
            // hdrSearchCriteria.Text = wc.uiClause();

            Search srch = new Search(AtMng, eFileBindingSource);

            fProgress.setMessageText(LawMate.Properties.Resources.RetrievingDataMessage);
            int iHits = srch.DoSearch(wc, wcContact, wcCaseStatus, includeXrefs);

            tsMatchesCount.Text = iHits.ToString();
            if (iHits < 1)
            {
                NoResults();
            }
            else
            {
                ShowResults();
            }
            System.Diagnostics.Trace.WriteLine("searchadv", "stop");
            InitCombos();
            ExactMatch(iHits);
            fProgress.resetForm();
        }
Exemple #4
0
 public fSearchResultsDoc(Form f, atLogic.WhereClause wc, fAdvancedSearch referrer, string fullText, bool includeXrefs, string formName, bool opinionsOnly)
     : base(f)
 {
     try
     {
         InitializeComponent();
         SearchDoc(f, wc, referrer, fullText, includeXrefs, formName, opinionsOnly);
         fProgress.resetForm();
         //dm.FM.Dispose();
     }
     catch (Exception x)
     {
         throw x;
         UIHelper.HandleUIException(x);
     }
     finally
     {
         fProgress.resetForm();
     }
 }