예제 #1
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;
            }
        }
예제 #2
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);
            }
        }
예제 #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
        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;
            }
        }
예제 #5
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);
        }
예제 #6
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();
        }
예제 #7
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);
            }
        }