예제 #1
0
        public fMemberManagement(Form f, atriumBE.atriumManager atMng)
            : base(f)
        {
            InitializeComponent();

            try
            {
                myAtMng  = atMng;
                myMemMng = myAtMng.GetMemberMng();
                myMemMng.LoadTribunalMemberAssignment();
                myMemMng.LoadFileFlagVC();

                tribunalMemberWorkloadBindingSource.DataSource   = myMemMng.LoadTribunalMemberWorkload();
                tribunalMemberAssignmentBindingSource.DataSource = myMemMng.DB.TribunalMemberAssignment;
                updateTribunalMemberAssignmentCounter();
                mListAssignmentFilter = myMemMng.LoadMemberListAssignmentFilter();

                maxDistance = Convert.ToInt32(maxDistanceEditBox.Text);

                FM = myAtMng.GetFile();
                atLogic.WhereClause wc = new atLogic.WhereClause();
                wc.Add("FlagCode", "<>", "ABEY");
                UIHelper.ComboBoxInit(FM.Codes("vFlagCode", wc, true), FlagCodeMultiDropDown, FM);

                InitCombos();
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
예제 #2
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();
            }
        }
예제 #3
0
        private void countryCodeComboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            if (countryCodeComboBox.SelectedValue != null)
            {
                atLogic.WhereClause wc  = new atLogic.WhereClause();
                DataTable           dtC = FM.Codes("Province");
                wc.Add("CountryCode", "=", countryCodeComboBox.SelectedValue.ToString());
                DataView dvC = new DataView(dtC, wc.Filter(), "", DataViewRowState.CurrentRows);
                provinceCodeComboBox.SetDataBinding(dvC, "");
            }

            //provinceCodeComboBox.SetDataBinding(new DataView(FM.Codes("Province"), "CountryCode='" + countryCodeComboBox.SelectedValue + "'", "ProvinceCode", DataViewRowState.CurrentRows), "");

            if (countryCodeComboBox.Text == "Canada")
            {
                this.postalCodeEditBox.CharacterCasing = CharacterCasing.Upper;
                this.postalCodeEditBox.Mask            = "L0L 0L0";
            }
            else if (countryCodeComboBox.Text == "United States of America")
            {
                this.postalCodeEditBox.CharacterCasing = CharacterCasing.Upper;
                this.postalCodeEditBox.Mask            = "00000";
            }
            else
            {
                this.postalCodeEditBox.CharacterCasing = CharacterCasing.Normal;
                this.postalCodeEditBox.Mask            = "";
                this.ReqColor = Color.White;
            }
        }
예제 #4
0
        public void bindData(lmDatasets.SST.SSTDecisionDataTable dt)
        {
            SSTM = FM.GetSSTMng();

            if (SSTM.GetSSTDecision().CanDelete(dt[0]))
            {
                tsDelete.Enabled = Janus.Windows.UI.InheritableBoolean.True;
            }
            else
            {
                tsDelete.Enabled = Janus.Windows.UI.InheritableBoolean.False;
            }
            setBindingSources();

            atLogic.WhereClause wc = new atLogic.WhereClause();


            DataTable dtOutcome = FM.Codes("vOutcome", wc, true);

            UIHelper.ComboBoxInit("vDecisionType", sSTDecisionGridEX.DropDowns["ddDecisionType"], FM);
            UIHelper.ComboBoxInit(dtOutcome, sSTDecisionGridEX.DropDowns["ddOutcome"], FM);
            UIHelper.ComboBoxInit("vmemberlist", sSTDecisionGridEX.DropDowns["ddMemberList"], FM);
            UIHelper.ComboBoxInit("vDecisionType", decisionTypeucMultiDropDown, FM);

            // UIHelper.ComboBoxInit(dtOutcome, outcomeIducMultiDropDown, FM);

            FilterOutcomes();

            memberIducContactSelectBox.FM = FM;

            dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);


            SSTM.GetSSTDecision().OnUpdate += new atLogic.UpdateEventHandler(ucSSTDecision_OnUpdate);
        }
예제 #5
0
        public int DoSearch(atLogic.WhereClause wc, atLogic.WhereClause wcContact, atLogic.WhereClause wcCaseStatus, bool includeXrefs)
        {
            appDB.EFileSearchDataTable dt;
            dt = this.AtMng.FileSearch(wc, wcContact, wcCaseStatus, includeXrefs);

            Bs.DataSource = dt;

            return(dt.Rows.Count);
        }
예제 #6
0
        private void FilterOutcomes()
        {
            atLogic.WhereClause wc = new atLogic.WhereClause();


            wc.Add("DecisionType", "=", CurrentRow().DecisionType);
            DataTable dtOutcome = FM.Codes("vOutcome", wc, true);

            UIHelper.ComboBoxInit(dtOutcome, outcomeIducMultiDropDown, FM);
        }
예제 #7
0
        public void bindData(lmDatasets.SST.SSTCaseDataTable dt)
        {
            SSTM = FM.GetSSTMng();


            //ucSSTCaseMatterIssues.DataSource = SSTM.DB.SSTCaseMatter;
            ucSSTCaseMatterIssues.FM = FM;
            setBindingSources();


            atLogic.WhereClause wc = new atLogic.WhereClause();

            if (!SSTM.DB.SSTCase[0].IsDecisionTypeNull())
            {
                wc.Add("DecisionType", "=", SSTM.DB.SSTCase[0].DecisionType);
            }
            else
            {
                wc.Add("DecisionType", "=", 1);
            }

            DataTable dtOutcome = FM.Codes("vOutcome", wc, true);

            UIHelper.ComboBoxInit(dtOutcome, OutcomeMultiDropDown, FM);
            UIHelper.ComboBoxInit("Program", ProgramMultiDropDown, FM);
            UIHelper.ComboBoxInit("LeaveToAppealType", LeaveToAppealDecisionMultiDropDown, FM);
            UIHelper.ComboBoxInit("CrisisType", CrisisTypeMultiDropDown, FM);
            UIHelper.ComboBoxInit("vAppealLevel", LevelMultiDropDown, FM);
            UIHelper.ComboBoxInit("vCaseStatus", CaseStatusMultiDropDown, FM);
            UIHelper.ComboBoxInit("HearingMethod", HearingGridEX.DropDowns["ddHearingMethod"], FM);
            UIHelper.ComboBoxInit("HearingStatus", HearingGridEX.DropDowns["ddStatusHearing"], FM);
            UIHelper.ComboBoxInit("vBenefitList", BenefitMultiDropDown, FM);
            //UIHelper.ComboBoxInit("vLateIgnoreReason", ignoreReasonucMultiDropDown, FM);

            dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);
            SSTM.DB.SSTCaseMatter.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);

            SSTM.DB.SSTCaseMatter.RowDeleted += new DataRowChangeEventHandler(dt_RowDeleted);

            SSTM.GetSSTCase().OnUpdate       += new atLogic.UpdateEventHandler(ucSSTCase_OnUpdate);
            SSTM.GetSSTCaseMatter().OnUpdate += new atLogic.UpdateEventHandler(ucSSTCase_OnUpdate);

            if (FM.CurrentFile.FileType == "RP" || FM.CurrentFile.FileType == "RE")
            {
                ckbADReturnToGD.Visible = true;
            }
            else
            {
                ckbADReturnToGD.Visible = false;
            }
        }
예제 #8
0
        private void btnExecuteSearch_Click(object sender, EventArgs e)
        {
            try
            {
                Application.UseWaitCursor = true;
                if (ebSearchFor.Text.Length > 0)
                {
                    atLogic.WhereClause wc = new atLogic.WhereClause();
                    switch (cbSearchType.SelectedItem.Value.ToString())
                    {
                    case "efSubject":
                        wc.Add("d.efSubject", "contains", UIHelper.BuildContains(SearchContainsOptions.AllOfTheTerms, ebSearchFor.Text));
                        break;

                    case "fulltext":
                        wc.Add("contents", "contains", UIHelper.BuildContains(SearchContainsOptions.AllOfTheTerms, ebSearchFor.Text));
                        break;

                    case "FileNumber":
                        wc.Add("f.filenumber", "likeboth", ebSearchFor.Text);
                        break;

                    case "FullFileNumber":
                        wc.Add("f.FullFileNumber", "like", ebSearchFor.Text);
                        break;
                    }

                    myDM.GetDocument().PreRefresh();
                    myDM.GetDocument().Search(wc, false);
                    PostDataLoad(myDM);
                    ucRecordList1.SearchResult(true);
                }
                else
                {
                    MessageBox.Show(Properties.Resources.UIMissingCriteria);
                }

                Application.UseWaitCursor = false;
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
                Application.UseWaitCursor = false;
            }
        }
예제 #9
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();
        }
예제 #10
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();
     }
 }
예제 #11
0
        private void provinceCodeComboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            uiCity.DisplayMember = "City";
            uiCity.ValueMember   = "City";

            object    val = uiCity.Text;
            DataTable dt  = FM.Codes("vCity");

            atLogic.WhereClause whereCl = new atLogic.WhereClause();
            if (provinceCodeComboBox.SelectedValue != null && provinceCodeComboBox.SelectedValue.ToString() != "")
            {
                whereCl.Add("ProvinceCode", "=", provinceCodeComboBox.SelectedValue.ToString());
                // DataTable dt = FM.AtMng.GetGeneralRec("City", whereCl);
                uiCity.DataSource = new DataView(dt, whereCl.Filter(), "City", DataViewRowState.CurrentRows);
            }
            else
            {
                uiCity.DataSource = null;
            }

            uiCity.Text = val.ToString();
        }
예제 #12
0
        private void explorerBar1_ItemClick(object sender, Janus.Windows.ExplorerBar.ItemEventArgs e)
        {
            try
            {
                Application.UseWaitCursor = true;
                atLogic.WhereClause wcy = new atLogic.WhereClause();
                if (e.Item.Key.StartsWith("ndChron"))
                {
                    wcy.Add("d.docid", "in", "select docid from recipient where officerid = " + myAtmng.WorkingAsOfficer.OfficerId.ToString() + " and type=0");
                }
                else
                {
                    wcy.Add("d.docid", "in", "select docid from recipient where officerid = " + myAtmng.WorkingAsOfficer.OfficerId.ToString() + " and type in (1,2)");
                }

                atLogic.WhereClause wcToExecute = wcy;
                bool executeSearch = true;

                switch (e.Item.Key)
                {
                case "ndCheckedOut":
                    atLogic.WhereClause wc = new atLogic.WhereClause();
                    wc.Add("CheckedoutBy", "=", myAtmng.WorkingAsOfficer.OfficerId);
                    wcToExecute = wc;
                    break;

                case "ndDrafts":
                    atLogic.WhereClause wcDrafts = new atLogic.WhereClause();
                    wcDrafts.Add("d.OfficerId", "=", myAtmng.WorkingAsOfficer.OfficerId);
                    wcDrafts.Add("d.IsDraft", "=", true);
                    wcToExecute = wcDrafts;
                    break;

                case "ndChronToday":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.Today.BeginDate, atDates.StandardDate.Today.EndDate);
                    break;

                case "ndChronYesterday":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.Yesterday.BeginDate, atDates.StandardDate.Yesterday.EndDate);
                    break;

                case "ndChronThisWeek":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.ThisWeek.BeginDate, atDates.StandardDate.ThisWeek.EndDate);
                    break;

                case "ndChronLastWeek":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.LastWeek.BeginDate, atDates.StandardDate.LastWeek.EndDate);
                    break;

                case "ndChronCustom":
                    fCustomDateRange fDateRange = new fCustomDateRange();
                    if (fDateRange.ShowDialog() == DialogResult.OK)
                    {
                        wcy.Add("d.efDate", "Between", (DateTime)fDateRange.BeginDate, (DateTime)fDateRange.EndDate);
                    }
                    else
                    {
                        executeSearch = false;
                    }
                    break;

                case "ndRecToday":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.Today.BeginDate, atDates.StandardDate.Today.EndDate);
                    break;

                case "ndRecYesterday":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.Yesterday.BeginDate, atDates.StandardDate.Yesterday.EndDate);
                    break;

                case "ndRecThisWeek":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.ThisWeek.BeginDate, atDates.StandardDate.ThisWeek.EndDate);
                    break;

                case "ndRecLastWeek":
                    wcy.Add("d.efDate", "Between", atDates.StandardDate.LastWeek.BeginDate, atDates.StandardDate.LastWeek.EndDate);
                    break;

                case "ndRecCustom":
                    fCustomDateRange fDateRange2 = new fCustomDateRange();
                    if (fDateRange2.ShowDialog() == DialogResult.OK)
                    {
                        wcy.Add("d.efDate", "Between", (DateTime)fDateRange2.BeginDate, (DateTime)fDateRange2.EndDate);
                    }
                    else
                    {
                        executeSearch = false;
                    }
                    break;

                default:
                    executeSearch = false;
                    break;
                }

                if (executeSearch)
                {
                    myDM.GetDocument().PreRefresh();
                    myDM.GetDocument().Search(wcToExecute, false);
                    PostDataLoad(myDM);
                    ucRecordList1.SearchResult(true);
                }
                Application.UseWaitCursor = false;
            }
            catch (Exception x)
            {
                Application.UseWaitCursor = false;
                UIHelper.HandleUIException(x);
            }
        }