コード例 #1
0
 private void uiContextMenu1_Popup(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         atriumBE.FileManager jumpToFM = FM.AtMng.GetFile(CurrentDetailRow().FileID);
         if (!jumpToFM.CurrentFile.IsOpponentIDNull())
         {
             cmdGoToActivity.Visible    = Janus.Windows.UI.InheritableBoolean.True;
             cmdGoToCB.Visible          = Janus.Windows.UI.InheritableBoolean.True;
             cmdGoToGeneralFile.Visible = Janus.Windows.UI.InheritableBoolean.False;
         }
         else
         {
             cmdGoToActivity.Visible    = Janus.Windows.UI.InheritableBoolean.False;
             cmdGoToCB.Visible          = Janus.Windows.UI.InheritableBoolean.False;
             cmdGoToGeneralFile.Visible = Janus.Windows.UI.InheritableBoolean.True;
         }
         this.Cursor = Cursors.Default;
     }
     catch (Exception x)
     {
         this.Cursor = Cursors.Default;
         UIHelper.HandleUIException(x);
     }
     finally { this.Cursor = Cursors.Default; }
 }
コード例 #2
0
        private void eFileGridEX_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right) //display context menu
            {
                try
                {
                    if (AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.Atrium) == atSecurity.SecurityManager.ExPermissions.No)
                    {
                        return;
                    }

                    if (CurrentRow() != null && eFileGridEX.HitTest() == Janus.Windows.GridEX.GridArea.Cell)
                    {
                        atriumBE.FileManager fm = AtMng.GetFile(CurrentRow().FileId);
                        FileTreeView.BuildMenu(fm, ucFileContextMenu1.uiCommandManager1.Commands["cmdFNew"], FileTreeView.dmFILENEW);
                        FileTreeView.BuidAKA(fm, ucFileContextMenu1.uiCommandManager1.Commands["cmdFileAKA"]);

                        ucFileContextMenu1.uiContextMenu4.CommandManager.Tag = CurrentRow();
                        ucFileContextMenu1.uiContextMenu4.Show();
                    }
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
コード例 #3
0
        public void InitLegend(atriumBE.FileManager fm)
        {
            FM = fm;
            //get all roles and contact types with colors defined
            DataTable gRoles = FM.Codes("RoleCode");
            DataTable fRoles = FM.Codes("ContactType");

            dtRoleLegend = new DataTable();
            dtRoleLegend.Columns.Add("Type", typeof(string));
            dtRoleLegend.Columns.Add("Description", typeof(string));
            dtRoleLegend.Columns.Add("Color", typeof(string));

            foreach (DataRow dr in gRoles.Rows)
            {
                if (!dr.IsNull("WFBGColor") && dr["WFBGColor"].ToString() != "0")
                {
                    dtRoleLegend.Rows.Add("G", dr["RoleEng"].ToString(), dr["WFBGColor"].ToString());
                }
            }
            foreach (DataRow dr in fRoles.Rows)
            {
                if (!dr.IsNull("WFBGColor") && dr["WFBGColor"].ToString() != "0")
                {
                    dtRoleLegend.Rows.Add("F", dr["ContactTypeDescEng"].ToString(), dr["WFBGColor"].ToString());
                }
            }

            gridExRoleLegend.DataSource = dtRoleLegend;
            gridExRoleLegend.DataMember = "";
            UIHelper.SetDataTableAsGridDataSource(gridExRoleLegend, dtRoleLegend);
        }
コード例 #4
0
        private void ApplyTimeslipSecurity(appDB.TimeSlipRow atr)
        {
            try
            {
                atriumBE.FileManager FMActivityTime = FM.AtMng.GetFile(atr.FileId);
                FMActivityTime.GetActivity().Load(atr.ActivityId);
                atriumDB.ActivityTimeRow actr = FMActivityTime.GetActivityTime().Load(atr.ActivityTimeId);

                bool canDelete = FMActivityTime.GetActivityTime().CanDelete(actr);

                if (canDelete)
                {
                    timeSlipGridEX.RootTable.Columns["Delete"].ButtonStyle = Janus.Windows.GridEX.ButtonStyle.Image;
                }
                else
                {
                    timeSlipGridEX.RootTable.Columns["Delete"].ButtonStyle = Janus.Windows.GridEX.ButtonStyle.NoButton;
                }

                if (FMActivityTime.GetActivityTime().CanEdit(actr))
                {
                    timeSlipGridEX.AllowEdit = Janus.Windows.GridEX.InheritableBoolean.True;
                }
                else
                {
                    timeSlipGridEX.AllowEdit = Janus.Windows.GridEX.InheritableBoolean.False;
                }
            }
            catch (Exception x)
            {
                timeSlipGridEX.RootTable.Columns["Delete"].ButtonStyle = Janus.Windows.GridEX.ButtonStyle.NoButton;
                timeSlipGridEX.AllowEdit = Janus.Windows.GridEX.InheritableBoolean.False;
            }
        }
コード例 #5
0
        public fDDTableField(Form f)
            : base(f)
        {
            InitializeComponent();
            AtMng.GetddTable().Load();
            AtMng.GetddField().Load();
            ddTableBindingSource1.DataSource = AtMng.DB;

            atriumBE.FileManager fm = AtMng.GetFile();

            DataTable dtDatasetName;

            dtDatasetName = new DataTable("DatasetList");
            dtDatasetName.Columns.Add("dsName", typeof(string));
            dtDatasetName.Rows.Add(AtMng.DB.DataSetName);
            dtDatasetName.Rows.Add(fm.DB.DataSetName);
            dtDatasetName.Rows.Add(fm.GetDocMng().DB.DataSetName);
            dtDatasetName.Rows.Add(fm.GetAdvisoryMng().DB.DataSetName);
            dtDatasetName.Rows.Add(fm.GetSSTMng().DB.DataSetName);
            dtDatasetName.Rows.Add(fm.GetCLASMng().DB.DataSetName);
            dtDatasetName.Rows.Add(AtMng.acMng.DB.DataSetName);
            dtDatasetName.Rows.Add(AtMng.CodeDB.DataSetName);
            dtDatasetName.Rows.Add(AtMng.SecurityManager.DB.DataSetName);
            dtDatasetName.Rows.Add(AtMng.HelpMng.DB.DataSetName);
            dtDatasetName.Rows.Add(AtMng.GetOffice().DB.DataSetName);

            UIHelper.ComboBoxInit(dtDatasetName, ddTableGridEX.DropDowns["ddDatasetName"], fm);
        }
コード例 #6
0
        private void DeleteTimeSlip(appDB.TimeSlipRow actr)
        {
            if (UIHelper.ConfirmDelete())
            {
                atriumBE.FileManager FMActivityTime = FM.AtMng.GetFile(actr.FileId);
                FMActivityTime.GetActivity().Load(actr.ActivityId);
                atriumDB.ActivityTimeRow atr = FMActivityTime.GetActivityTime().Load(actr.ActivityTimeId);
                Application.UseWaitCursor = true;
                atr.Delete();
                actr.Delete();
                try
                {
                    atLogic.BusinessProcess bp = FMActivityTime.GetBP();
                    bp.AddForUpdate(FMActivityTime.GetActivityTime());

                    bp.Update();

                    if (CurrentRowSRP().IsSRPSubmittedDateNull())
                    {
                        CalculateOpenPeriodTotals(CurrentRowSRP());
                    }
                }
                catch (Exception x1)
                {
                    FMActivityTime.DB.ActivityTime.RejectChanges();
                    throw x1;
                }
                finally
                {
                    Application.UseWaitCursor = false;
                }
            }
        }
コード例 #7
0
 private void panel1_MouseDown(object sender, MouseEventArgs e)
 {
     try
     {
         Workflow.Step s = diagram.HitStep(e.Location);
         if (s != null)
         {
             diagram.SelectStep(s);
             ucWorkflowHeader1.SetStep(s.myACS);
             atriumBE.FileManager FMforTranslation = atmng.GetFile();
             StepOrConnectorSelected = true;
             if (!s.myACS.IsNull(UIHelper.Translate(FMforTranslation, "HelpE")))
             {
                 Navigate(s.myACS);
             }
         }
         //else
         //{
         //    Workflow.Connector c = diagram.HitConnector(e.Location);
         //    if (c != null)
         //    {
         //        if(!c.myACD.
         //        diagram.SelectConnector(c);
         //        StepOrConnectorSelected = true;
         //    }
         //}
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #8
0
 private void uiCommandManager1_CommandMouseHover(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
 {
     try
     {
         if (e.Command.Key == "cmdBack")
         {
             if (e.Command.Enabled == Janus.Windows.UI.InheritableBoolean.True)
             {
                 int CurrentSeriesId  = (int)SeriesStack.Pop();
                 int PreviousSeriesId = (int)SeriesStack.Peek();
                 lmDatasets.ActivityConfig.SeriesRow[] sra = (lmDatasets.ActivityConfig.SeriesRow[])atmng.acMng.DB.Series.Select("SeriesId=" + PreviousSeriesId);
                 //lmDatasets.ActivityConfig.SeriesRow sr = atmng.acMng.GetSeries().Load(PreviousSeriesId);
                 atriumBE.FileManager FMforTranslation = atmng.GetFile();
                 e.Command.ToolTipText = sra[0][UIHelper.Translate(FMforTranslation, "SeriesDescEng")].ToString();
                 SeriesStack.Push(CurrentSeriesId);
             }
             else
             {
                 e.Command.ToolTipText = "";
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #9
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdImport":
                    if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        string file             = openFileDialog1.FileName;
                        atriumBE.FileManager fm = AtMng.GetFile();
                        fm.GetArchiveBatch().ManageArchiveData(file, false);
                    }
                    break;

                case "cmdCreate":
                    break;

                case "cmdPackingList":
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
コード例 #10
0
 private void timFMHeartbeat_Tick(object sender, EventArgs e)
 {
     try
     {
         atriumBE.FileManager fm = AtMng.GetFile(myFM.CurrentFile.FileId);
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #11
0
        private void fTemplates_Load(object sender, EventArgs e)
        {
            myFM = AtMng.GetTemplate().FM;
            myDM = myFM.GetDocMng();
            ucDoc1.Init(myDM);

            UIHelper.ComboBoxInit(myFM.Codes("vDocType"), mccCommType, myFM);
            UIHelper.ComboBoxInit(myFM.Codes("TemplateLayoutStyle"), mccLayoutStyle, myFM);
            templateBindingSource.DataSource      = AtMng.DB;
            templateBindingSource.CurrentChanged += new EventHandler(templateBindingSource_CurrentChanged);
            templateBindingSource.ResetBindings(false);

            templateGridEX.MoveFirst();

            cmdInsertTag.Enabled = Janus.Windows.UI.InheritableBoolean.False;
        }
コード例 #12
0
        private void tsAdd_Click(object sender, EventArgs e)
        {
            try
            {
                ToolStripMenuItem             ctx = (ToolStripMenuItem)sender;
                Control                       c   = (Control)ctx.Owner.Tag;
                lmDatasets.docDB.RecipientRow r   = (lmDatasets.docDB.RecipientRow)c.Tag;

                atriumBE.FileManager myFm = dm.AtMng.GetFile(currentMsg.FileId);
                myFm.GetDocMng().GetRecipient().AddRecipToFile(r, true, "FNA");
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
コード例 #13
0
        private void fPLOffice_Load(object sender, EventArgs e)
        {
            AtMng.GetPLOffice().Load();
            pLOfficeBindingSource.DataSource = AtMng.DB;

            atriumBE.FileManager FM = AtMng.GetFile();

            pLOfficeGridEX.DropDowns["ddContactType"].SetDataBinding(FM.Codes("ContactType"), "");
            pLOfficeGridEX.DropDowns["ddFileType"].SetDataBinding(FM.Codes("FileType"), "");
            pLOfficeGridEX.DropDowns["ddStatus"].SetDataBinding(FM.Codes("Status"), "");
            pLOfficeGridEX.DropDowns["ddOffice"].SetDataBinding(FM.Codes("vOfficeList"), "");
            pLOfficeGridEX.DropDowns["ddOfficer"].SetDataBinding(FM.Codes("vOfficerList"), "");
            pLOfficeGridEX.DropDowns["ddOfficeType"].SetDataBinding(FM.Codes("OfficeType"), "");

            pLOfficeGridEX.MoveFirst();
        }
コード例 #14
0
        private void tsAddToAddressBook_Click(object sender, EventArgs e)
        {
            try
            {
                ToolStripMenuItem             ctx = (ToolStripMenuItem)sender;
                Control                       c   = (Control)ctx.Owner.Tag;
                lmDatasets.docDB.RecipientRow r   = (lmDatasets.docDB.RecipientRow)c.Tag;

                //get users addressbook file
                atriumBE.FileManager myFm = dm.AtMng.GetFile(dm.AtMng.WorkingAsOfficer.MyFileId);
                myFm.GetDocMng().GetRecipient().AddRecipToFile(r, true, "FAB");
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
コード例 #15
0
        public fOfficeToJudicialDistrict(Form f) : base(f)
        {
            InitializeComponent();
            AtMng.OfficeMng.GetOffice2JD().Load();
            atriumBE.FileManager FM = AtMng.GetFile();

            //office2JDGridEX.DropDowns["ddOffice"].SetDataBinding(FM.Codes("vofficelist"),"");
            //mccOfficeId.SetDataBinding(FM.Codes("vofficelist"), "");
            UIHelper.ComboBoxInit(FM.Codes("vofficelist"), office2JDGridEX.DropDowns["ddOffice"], FM);
            UIHelper.ComboBoxInit(FM.Codes("province"), office2JDGridEX.DropDowns["ddProvinceDescription"], FM);
            UIHelper.ComboBoxInit(FM.Codes("vofficelist"), mccOfficeId, FM);
            UIHelper.ComboBoxInit(FM.Codes("province"), mccProvinceCode, FM);

            //FM.Dispose();

            office2JDBindingSource.DataSource = AtMng.OfficeMng.DB;
            office2JDBindingSource.DataMember = AtMng.OfficeMng.DB.Office2JD.TableName;
        }
コード例 #16
0
        public fIssues(Form f)
            : base(f)
        {
            InitializeComponent();
            myFM = AtMng.GetFile();
            ucFileSelectBox1.AtMng   = AtMng;
            ucOfficeSelectBox1.AtMng = AtMng;

            issueBindingSource1.DataSource = AtMng.DB;
            issueBindingSource1.DataMember = AtMng.DB.Issue.TableName;

            UIHelper.MultiColumnComboInit("vProvision", mccLegProvision, myFM);
            UIHelper.MultiColumnComboInit("vProvision", mccRegProvision, myFM);

            //myFM.DB.Issue.ColumnChanged += new DataColumnChangeEventHandler(Issue_ColumnChanged);
            //myFM.GetIssue().OnUpdate += new atLogic.UpdateEventHandler(fIssues_OnUpdate);
            LoadRoot();
        }
コード例 #17
0
        private void timeSlipGridEX_CellUpdated(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
        {
            try
            {
                int fileid = CurrentRowACTimeSlip().FileId;
                if (e.Column.Key == "Hours" || e.Column.Key == "Comment")
                {
                    timeSlipGridEX.UpdateData();
                    Application.UseWaitCursor = true;
                    //get FM, load activitytime record and update hours/comment
                    atriumBE.FileManager FMActivityTime = FM.AtMng.GetFile(fileid);
                    FMActivityTime.GetActivity().Load(CurrentRowACTimeSlip().ActivityId);
                    atriumDB.ActivityTimeRow atr = FMActivityTime.GetActivityTime().Load(CurrentRowACTimeSlip().ActivityTimeId);
                    if (CurrentRowACTimeSlip().IsHoursNull())
                    {
                        CurrentRowACTimeSlip().Hours = 0;
                    }
                    atr.Hours   = CurrentRowACTimeSlip().Hours;
                    atr.Comment = CurrentRowACTimeSlip().Comment;

                    timeSlipBindingSource.EndEdit();
                    try
                    {
                        atLogic.BusinessProcess bp = FM.GetBP();
                        bp.AddForUpdate(FMActivityTime.GetActivityTime());

                        bp.Update();

                        CalculateOpenPeriodTotals(CurrentRowSRP());
                    }
                    catch (Exception x1)
                    {
                        FMActivityTime.DB.ActivityTime.RejectChanges();
                        throw x1;
                    }
                    Application.UseWaitCursor = false;
                }
            }
            catch (Exception x)
            {
                Application.UseWaitCursor = false;
                UIHelper.HandleUIException(x);
            }
        }
コード例 #18
0
        public fWorkloadView(WorkloadQuery wlQuery, bool pExpectsReturnValue, atriumBE.FileManager fm, object contactId)
        {
            InitializeComponent();
            atmng            = fm.AtMng;
            fmNew            = fm;
            myWorkloadQuery  = wlQuery;
            currentContactId = contactId;

            UIHelper.ComboBoxInit("LanguageCode", languageCodeucMultiDropDown, fm);
            UIHelper.ComboBoxInit("NativeLanguage", ucMultiDDNativeLanguage, fm);

            ucAddress1.FM = fm;

            addressBindingSource.DataMember = fmNew.DB.Address.TableName;
            addressBindingSource.DataSource = fmNew.DB;
            contactBindingSource.DataMember = "Contact";// .Contact.Select("", "", DataViewRowState.Added);
            contactBindingSource.DataSource = fmNew.DB;


            // addressBindingSource.DataSource = fmNew.DB.Address.Select("", "", DataViewRowState.Added);
            ucAddress1.DataSource = addressBindingSource;

            ExpectsReturnValue = pExpectsReturnValue;

            if (wlQuery == WorkloadQuery.ParticipantSearch)
            {
                pnlAll.Closed         = true;
                pnlParticipant.Closed = false;
                pnlNewCoontact.Closed = true;
                this.Text             = Properties.Resources.ParticipantSearch;
                tbSearchName.Focus();
            }
            else
            {
                pnlParticipant.Closed = true;
                pnlAll.Closed         = false;
                pnlNewCoontact.Closed = true;
                this.Text             = Properties.Resources.WorkloadDistribution;
                tbSearchName.Focus();
            }
        }
コード例 #19
0
        public fBFCode(Form f)
            : base(f)
        {
            InitializeComponent();

            ucBFCode1.AtMng = AtMng;

            aCBFBindingSource.DataMember = AtMng.acMng.DB.ACBF.ToString();
            aCBFBindingSource.DataSource = AtMng.acMng.DB;


            atriumBE.FileManager FM = AtMng.GetFile();
            aCBFGridEX.DropDowns["ddBFType"].SetDataBinding(FM.Codes("BFType"), "");
            aCBFGridEX.DropDowns["ddRoleCode"].SetDataBinding(FM.AtMng.GetGeneralRec("select * from vRoleuContactType where obsolete=0"), "");
            FM.Dispose();


            int id = CurrentRow().ACBFId;

            ucBFCode1.DataSource = new DataView(AtMng.acMng.DB.ACBF, "ACBFId=" + id.ToString(), "", DataViewRowState.CurrentRows);
        }
コード例 #20
0
        public void Init(atriumBE.FileManager fm, DateTime rangeStartDate, DateTime rangeEndDate)
        {
            if (myFM == null)
            {
                myFM = fm;

                TimeLineGroup group = new TimeLineGroup(this.timeLine1.Fields["ContactId"]);
                timeLine1.Groups.Add(group);
            }

            UIHelper.ComboBoxInit("AppointmentNotification", ReminderDropDown, myFM);


            //JLL 2013-09-27 Translation for 2013/10 Build
            lblTZ.Text     = UIHelper.GetTimeZoneLabel();// TimeZoneInfo.Local.StandardName;
            RangeStartDate = rangeStartDate;
            RangeEndDate   = rangeEndDate;

            timeLine1.FirstDate = DateTime.Now.AddHours(-2);
            timeLine1.MinDate   = DateTime.Today;
        }
コード例 #21
0
        public fData(atriumBE.FileManager fm)
        {
            InitializeComponent();

            propertyGrid1.SelectedObject = fm.CurrentFile;
        }
コード例 #22
0
        public fDataDictionnary(Form f)
            : base(f)
        {
            InitializeComponent();
            //App FMain Loads All data, don't need to load again,.
            //AtMng.GetddTable().Load();
            //AtMng.GetddField().Load();
            ddTableBindingSource.DataSource = AtMng.DB.ddTable;
            ddFieldBindingSource.DataSource = AtMng.DB.ddField;

            DataView dv1 = new DataView(AtMng.acMng.DB.ACDocumentation);

            aCDocumentationBindingSource.DataSource = dv1;
            aCDocumentationBindingSource.Filter     = "ACDocid=0";

            DataView dv2 = new DataView(AtMng.acMng.DB.ACDocumentation);

            ddFieldRuleMSg.DataSource = dv2;
            ddFieldRuleMSg.Filter     = "ACDocid=0";

            atriumBE.FileManager fm = AtMng.GetFile();

            DataTable dtDatasetName;

            dtDatasetName = new DataTable("DatasetList");
            dtDatasetName.Columns.Add("dsName", typeof(string));
            dtDatasetName.Columns.Add("dsFullName", typeof(string));
            dtDatasetName.Rows.Add("ActivityConfig", "ActivityConfig Dataset");
            dtDatasetName.Rows.Add("appDB", "AppDB Dataset");
            dtDatasetName.Rows.Add("CodesDB", "CodesDB Dataset");
            dtDatasetName.Rows.Add("atriumDB", "AtriumDB Dataset");
            dtDatasetName.Rows.Add("docDB", "DocDB Dataset");
            dtDatasetName.Rows.Add("officeDB", "OfficeDB Dataset");
            dtDatasetName.Rows.Add("SecurityDB", "SecurityDB Dataset");
            dtDatasetName.Rows.Add("HelpDB", "HelpDB Dataset");
            dtDatasetName.Rows.Add("SST", "SST Dataset");
            dtDatasetName.Rows.Add("CLAS", "CLAS Dataset");
            dtDatasetName.Rows.Add("Advisory", "Advisory Dataset");

            DataTable dtEvents = AtMng.GetddRule().dtEvents;

            DataTable dtRuleTypes = AtMng.GetddRule().dtRuleTypes;

            UIHelper.ComboBoxInit(new DataView(dtEvents, "Id not in (1,7,10)", "", DataViewRowState.CurrentRows), ucTableEvent, fm);
            UIHelper.ComboBoxInit(new DataView(dtEvents, "Id in (1,7,10)", "", DataViewRowState.CurrentRows), eventIducMultiDropDown, fm);
            //UIHelper.ComboBoxInit(dtEvents, ucTableEvent, fm);

            UIHelper.ComboBoxInit(new DataView(dtRuleTypes, "id in (0,2,99)", "", DataViewRowState.CurrentRows), ucTableRuleType, fm);
            UIHelper.ComboBoxInit(new DataView(dtRuleTypes), ruleTypeIducMultiDropDown, fm);
            //UIHelper.ComboBoxInit(dtRuleTypes, ucTableEvent, fm);

            UIHelper.ComboBoxInit(dtDatasetName, ddTableGridEX.DropDowns["ddDataset"], fm);
            UIHelper.ComboBoxInit("ACControlType", ddFieldGridEX.DropDowns["ddACControlType"], fm);
            UIHelper.ComboBoxInit(dtDatasetName, mccDataset, fm);
            UIHelper.ComboBoxInit("ACControlType", mccACControlType, fm);

            DataView dvACSeries = new DataView(AtMng.acMng.DB.ACSeries, "(steptype=11) and obsolete=0", "stepcode", DataViewRowState.CurrentRows);

            suffixComboBox.SetDataBinding(dvACSeries, "");

            DataView dvACSeriesRules = new DataView(AtMng.acMng.DB.ACSeries, "(steptype in(10,12)) and obsolete=0", "stepcode", DataViewRowState.CurrentRows);

            ucTableRuleACS.SetDataBinding(dvACSeriesRules, "");
            ucFieldRuleACS.SetDataBinding(dvACSeriesRules, "");

            atSecurity.SecurityManager mySecMan = AtMng.SecurityManager;
            mySecMan.GetsecFeature().Load();
            UIHelper.ComboBoxInit(new System.Data.DataView(mySecMan.DB.secFeature, "", "FeatureName", DataViewRowState.CurrentRows), mccFeature, fm);
            UIHelper.ComboBoxInit(new System.Data.DataView(mySecMan.DB.secFeature, "", "FeatureName", DataViewRowState.CurrentRows), ucFieldFeatureId, fm);

            UIHelper.ComboBoxInit(AtMng.DB.ddLookup, mccLookup, fm);

            dtReferencedInSteps = new DataTable("dtReferencedInSteps");
            dtReferencedInSteps.Columns.Add("FieldId", typeof(int));
            dtReferencedInSteps.Columns.Add("StepCode", typeof(string));
            dtReferencedInSteps.Columns.Add("TaskType", typeof(string));
            dtReferencedInSteps.Columns.Add("ObjectAlias", typeof(string));
            dtReferencedInSteps.Columns.Add("Block", typeof(string));
            dtReferencedInSteps.Columns.Add("ActivityFieldID", typeof(int));
            dtReferencedInSteps.Columns.Add("ActivityNameEng", typeof(string));
            dtReferencedInSteps.Columns.Add("SeriesCode", typeof(string));
            dtReferencedInSteps.Columns.Add("SeriesDescEng", typeof(string));
            dtReferencedInSteps.Columns.Add("ACSeriesId", typeof(int));
            dtReferencedInSteps.Columns.Add("SeriesId", typeof(int));
            dtReferencedInSteps.Columns.Add("DefaultValue", typeof(string));
            UIHelper.SetDataTableAsGridDataSource(gridEX1, dtReferencedInSteps);
            bindingSourceFieldReference.DataSource = dtReferencedInSteps;
            gridEX1.DataSource = bindingSourceFieldReference;
        }
コード例 #23
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "tsCopyPrefs":

                    fContactSelect fcs = new fContactSelect(FM, null, false);
                    if (fcs.ShowDialog() == DialogResult.OK)
                    {
                        officeDB.OfficerRow fromR = FM.LeadOfficeMng.GetOfficer().FindLoad(fcs.ContactId);
                        if (MessageBox.Show("Are you sure you want to copy all the preferences from " + fromR.DisplayName + " to " + CurrentRow().DisplayName + "?", "Copy Preferences", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                        {
                            int fromOfficer = fcs.ContactId;

                            FM.LeadOfficeMng.GetOfficer().CopyPreferences(fromOfficer, CurrentRow().OfficerId, true);
                            atLogic.BusinessProcess bp1 = FM.GetBP();
                            bp1.AddForUpdate(FM.LeadOfficeMng.DB.OfficerPrefs);
                            bp1.Update();
                        }
                    }
                    break;

                case "cmdAddToAB":
                    atriumBE.FileManager fmAB = FM.AtMng.GetFile(FM.AtMng.WorkingAsOfficer.MyFileId);
                    try
                    {
                        fmAB.GetFileContact().Add(CurrentRow(), "FAB");

                        atLogic.BusinessProcess bp = fmAB.GetBP();
                        bp.AddForUpdate(fmAB.GetFileOffice());
                        bp.AddForUpdate(fmAB.GetPerson());
                        bp.AddForUpdate(fmAB.GetFileContact());
                        bp.AddForUpdate(fmAB.EFile);
                        bp.Update();
                    }
                    catch (Exception x)
                    {
                        fmAB.DB.RejectChanges();
                        throw x;
                    }

                    break;

                case "tsMyFile":
                    if (CurrentRow().IsMyFileIdNull() || (!CurrentRow().IsMyFileIdNull() && MessageBox.Show(LawMate.Properties.Resources.PersonalFileAlreadyExists, LawMate.Properties.Resources.CreatePersonalFile, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes))
                    {
                        fBrowse f = new fBrowse(FM.AtMng, FM.CurrentFile.FileId, true, true, true, true);
                        if (f.ShowDialog() == DialogResult.OK)
                        {
                            FM.LeadOfficeMng.GetOfficer().CreatePersonalFiles(f.SelectedFile.FileId, CurrentRow(), LawMate.Properties.Settings.Default.UseSeparatePersonalFiles);
                            Save();
                        }
                    }
                    break;

                case "tsSave":
                    Save();
                    break;

                case "tsDelete":
                    Delete();
                    break;

                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;

                case "tsNew":
                    //officerBindingSource.AddNew();
                    officeDB.OfficerRow or = (officeDB.OfficerRow)FM.LeadOfficeMng.GetOfficer().Add(FM.LeadOfficeMng.CurrentOffice);
                    officerBindingSource.Position = officerBindingSource.Find("OfficerId", or.OfficerId);
                    break;

                case "tsOfficeMailView":
                    FileForm().MainForm.OpenBFList(CurrentRow());
                    break;

                case "tsOfficerBFList":
                    FileForm().MainForm.OpenBFList(CurrentRow());

                    break;

                case "tsResetPassword":

                    break;

                case "tsGroupBy":
                    if (e.Command.Checked == Janus.Windows.UI.InheritableBoolean.True)
                    {
                        officerGridEX.GroupByBoxVisible = true;
                    }
                    else
                    {
                        officerGridEX.GroupByBoxVisible = false;
                    }
                    break;

                case "tsFilter":
                    if (e.Command.Checked == Janus.Windows.UI.InheritableBoolean.True)
                    {
                        officerGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.Automatic;
                    }
                    else
                    {
                        officerGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.None;
                    }
                    break;

                case "tsSecurity":
                    Save();
                    fSecurity fs = new fSecurity();
                    fs.Init(FM.AtMng.SecurityManager, CurrentRow());
                    fs.ShowDialog();
                    Save();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }