Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
                }
            }
        }
Ejemplo n.º 4
0
        private void ResumeActivity()
        {
            //if (listBox1.SelectedIndex != -1)
            if (CurrentRow() != null)
            {
                if (CurrentRow().HasErrors)
                {
                    pnlCannotResume.Closed = false;
                    throw new LMException(CurrentRow().RowError);
                }
                else
                {
                    //restores aces object
                    ACEState aces = ACEStateDictionnary[CurrentRow().ActivityId];

                    //check for latest on resume
                    if (DocumentIsLatest(aces, CurrentRow()))
                    {
                        Close();
                        //get fm
                        FileManager fm = AtMng.GetFile(aces);

                        fFile f = MainForm.OpenFile(fm.CurrentFile.FileId);
                        f.RestoreWizard(aces);
                    }
                    else if (CurrentRow().HasErrors)
                    {
                        pnlCannotResume.Closed = false;
                        throw new LMException(CurrentRow().RowError);
                    }
                }
            }
        }
Ejemplo n.º 5
0
        private void fAutoSave_Load(object sender, EventArgs e)
        {
            myFM = AtMng.GetFile();
            try
            {
                LoadData();
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
            //DocManager dm = myFM.GetDocMng();

            //dm.GetDocument();
            //dm.GetDocContent();
            //dm.GetAttachment();
            //dm.GetRecipient();

            //ucDoc1.Init(dm);

            //Atmng.LoadSuspendedAcs();
            //LoadAutoSaveDT();
            //autoSaveBindingSource.DataSource = AutoSaveDT;
            //SetRowChangeUI(autoSaveBindingSource.Count == 0);
            //ucDoc1.ReturnFocusTo = this.autoSaveGridEX;
            //autoSaveGridEX.MoveFirst();
        }
Ejemplo n.º 6
0
 public fLoad(Form f)
     : base(f)
 {
     InitializeComponent();
     ucDest.AtMng = AtMng;
     UIHelper.ComboBoxInit(AtMng.acMng.DB.ACSeries, ucMultiDropDown1, AtMng.GetFile());
     UIHelper.ComboBoxInit(AtMng.GetFile().Codes("FileType"), ucMultiDropDown2, AtMng.GetFile());
 }
Ejemplo n.º 7
0
        private void InitCombos()
        {
            UIHelper.ComboBoxInit("FileType", eFileGridEX.DropDowns["ddFileType"], AtMng.GetFile());
            UIHelper.ComboBoxInit("FileMetaType", eFileGridEX.DropDowns["ddMetaType"], AtMng.GetFile());
            UIHelper.ComboBoxInit("ReturnCode", eFileGridEX.DropDowns["ddCloseCode"], AtMng.GetFile());

            DataTable dt1 = AtMng.GetFile().Codes("Dim1");

            lmDatasets.appDB.ddLookupRow dlr1 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='Dim1'")[0];
            eFileGridEX.RootTable.Columns["Dim1Id"].Caption       = dlr1["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddDim1"].ValueMember           = dt1.PrimaryKey[0].ColumnName;
            eFileGridEX.DropDowns["ddDim1"].DisplayMember         = dt1.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddDim1"].Columns[0].DataMember = dt1.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt1, eFileGridEX.DropDowns["ddDim1"], AtMng.GetFile());

            DataTable dt2 = AtMng.GetFile().Codes("Dim2");

            lmDatasets.appDB.ddLookupRow dlr2 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='Dim2'")[0];
            eFileGridEX.RootTable.Columns["Dim2Id"].Caption       = dlr2["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddDim2"].ValueMember           = dt2.PrimaryKey[0].ColumnName;
            eFileGridEX.DropDowns["ddDim2"].DisplayMember         = dt2.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddDim2"].Columns[0].DataMember = dt2.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt2, eFileGridEX.DropDowns["ddDim2"], AtMng.GetFile());

            eFileGridEX.DropDowns["ddOffice"].SetDataBinding(AtMng.GetFile().Codes("OfficeList"), "");

            //DataTable dt3 = AtMng.GetFile().Codes("EfileLeadPL");
            //lmDatasets.appDB.ddLookupRow dlr3 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileLeadPL'")[0];
            //eFileGridEX.RootTable.Columns["LeadParaLegalCode"].Caption = dlr3["Description" + AtMng.AppMan.Language].ToString();
            //UIHelper.ComboBoxInit(dt3, eFileGridEX.DropDowns["ddOfficer"], AtMng.GetFile());

            DataTable dt3 = AtMng.GetFile().Codes("EfileLeadPL");

            lmDatasets.appDB.ddLookupRow dlr3 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileLeadPL'")[0];
            eFileGridEX.RootTable.Columns["LeadParaLegalCode"].Caption = dlr3["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddOfficer"].ValueMember             = dlr3.PKName;// dt3.Columns[4].ColumnName;
            eFileGridEX.DropDowns["ddOfficer"].DisplayMember           = dt3.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddOfficer"].Columns[0].DataMember   = dt3.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt3, eFileGridEX.DropDowns["ddOfficer"], AtMng.GetFile());

            DataTable dt5 = AtMng.GetFile().Codes("EfileOfficer");

            lmDatasets.appDB.ddLookupRow dlr5 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileOfficer'")[0];
            eFileGridEX.RootTable.Columns["OfficerId"].Caption        = dlr5["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddOfficer1"].ValueMember           = dlr5.PKName;// dt5.Columns[4].ColumnName;
            eFileGridEX.DropDowns["ddOfficer1"].DisplayMember         = dt5.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddOfficer1"].Columns[0].DataMember = dt5.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt5, eFileGridEX.DropDowns["ddOfficer1"], AtMng.GetFile());


            DataTable dt4 = AtMng.GetFile().Codes("EfileLeadLawyer");

            lmDatasets.appDB.ddLookupRow dlr4 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileLeadLawyer'")[0];
            eFileGridEX.RootTable.Columns["LeadLawyerId"].Caption = dlr4["Description" + AtMng.AppMan.Language].ToString();
            UIHelper.ComboBoxInit(dt4, eFileGridEX.DropDowns["ddLawyer"], AtMng.GetFile());
        }
Ejemplo n.º 8
0
 private void timFMHeartbeat_Tick(object sender, EventArgs e)
 {
     try
     {
         atriumBE.FileManager fm = AtMng.GetFile(myFM.CurrentFile.FileId);
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Ejemplo n.º 9
0
 private void ucDoc1_DocAction(object sender, UserControls.DocActionEventArgs e)
 {
     try
     {
         lmWinHelper.DocAction(AtMng.GetFile(e.DocRecord.FileId), e);
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Ejemplo n.º 10
0
        public fDistributionList(Form f)
            : base(f)
        {
            InitializeComponent();

            listBindingSource.DataSource       = AtMng.DB;
            listMemberBindingSource.DataSource = AtMng.DB;
            listMemberGridEX.DropDowns["ddOfficer"].SetDataBinding(AtMng.GetFile().Codes("vOfficerList"), "");

            AtMng.GetList().Load();
            AtMng.GetListMember().Load();
        }
Ejemplo n.º 11
0
        public fBatch(Form f) : base(f)
        {
            InitializeComponent();

            cbStatus.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem("Pending", "P", 0));
            cbStatus.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem("Active", "A", 1));
            cbStatus.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem("Finished", "F", 2));
            cbStatus.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem("Failed", "X", 3));
            cbStatus.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem("Read", "R", 4));

            UIHelper.ComboBoxInit("vofficerlist", ucMultiDropDown1, AtMng.GetFile());

            batchBindingSource.DataSource = AtMng.DB;
        }
Ejemplo n.º 12
0
        public fACMenu(Form f)
            : base(f)
        {
            InitializeComponent();
            aCMenuGridEX.DropDowns["ddACSeries"].SetDataBinding(AtMng.acMng.DB.ACSeries, "");
            aCMenuGridEX.DropDowns["ddACSeriesActivityName"].SetDataBinding(AtMng.acMng.DB.ACSeries, "");
            aCMenuGridEX.DropDowns["ddACSeriesSuffix"].SetDataBinding(AtMng.acMng.DB.ACSeries, "");
            aCMenuGridEX.DropDowns["ddMenu"].SetDataBinding(AtMng.GetFile().Codes("MenuForms"), "");

            aCMenuBindingSource.DataSource = AtMng.acMng.DB;
            aCMenuBindingSource.DataMember = AtMng.acMng.DB.ACMenu.TableName;

            menuBindingSource.DataSource = AtMng.acMng.DB;
            menuBindingSource.DataSource = AtMng.acMng.DB.Menu.TableName;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 14
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();
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 16
0
 private void fileContactGridEX_ColumnButtonClick(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
 {
     try
     {
         switch (e.Column.Key)
         {
         case "EmailAddress":
             if (!CurrentRow().IsEmailAddressNull())
             {
                 lmWinHelper.NewMail(AtMng.GetFile(AtMng.WorkingAsOfficer.SentItemsId), CurrentRow().EmailAddress);
             }
             break;
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Ejemplo n.º 17
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);
        }
Ejemplo n.º 18
0
        private void listMemberGridEX_ColumnButtonClick(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
        {
            try
            {
                if (e.Column == listMemberGridEX.RootTable.Columns["MemberListId"] && !CurrentRowListMember().IsMemberListIdNull())
                {
                    foreach (Janus.Windows.GridEX.GridEXRow gr in listGridEX.GetRows())
                    {
                        if ((int)gr.Cells["ListId"].Value == CurrentRowListMember().MemberListId)
                        {
                            listGridEX.Row = gr.Position;
                            return;
                        }
                    }
                }
                if (e.Column == listMemberGridEX.RootTable.Columns["ContactId"])
                {
                    if (fSearchContact == null)
                    {
                        fSearchContact = new fContactSelect(AtMng.GetFile(), null, false);
                    }

                    fSearchContact.ShowDialog();

                    if (fSearchContact.ContactId != 0)
                    {
                        CurrentRowListMember().ContactId = fSearchContact.ContactId;
                    }

                    fSearchContact.Hide();
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 19
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;
        }
Ejemplo n.º 20
0
        private void LoadAutoSaveDT()
        {
            ACEStateDictionnary = new Dictionary <int, ACEState>();
            AutoSaveDT          = new appDB.AutoSaveDataTable();
            AutoSaveDT.BeginLoadData();
            foreach (ACEState itm in AtMng.SuspendedAcs)
            {
                //itm.Doc_DB.FileFormat.Merge(myFM.GetDocMng().DB.FileFormat);
                appDB.AutoSaveRow            autoSaveRow = AutoSaveDT.NewAutoSaveRow();
                ActivityConfig.ACSeriesRow[] acsr        = (ActivityConfig.ACSeriesRow[])AtMng.acMng.DB.ACSeries.Select("acseriesid=" + itm.AcSeriesId);
                ACEStateDictionnary.Add(itm.ActivityId, itm);
                if (acsr.Length == 1)
                {
                    autoSaveRow.StepCode        = acsr[0].StepCode;
                    autoSaveRow.ActivityNameEng = acsr[0].ActivityNameEng;
                }
                else
                {
                    autoSaveRow.StepCode        = LawMate.Properties.Resources.INVALIDACTIVITY;
                    autoSaveRow.ActivityNameEng = LawMate.Properties.Resources.INVALIDACTIVITY;
                    autoSaveRow.RowError        = LawMate.Properties.Resources.CannotResumeThisActivity;
                }
                autoSaveRow.ActivityId = itm.ActivityId;
                atriumDB dsA = new atriumDB();
                dsA.Merge(ACEState.GetDSFromACE(itm, myFM.GetBEMngrForTable("EFile").MyDS.DataSetName));
                autoSaveRow.SaveDate = dsA.Activity.FindByActivityId(itm.ActivityId).ActivityEntryDate;

                if (!dsA.Activity.FindByActivityId(itm.ActivityId).IsDocIdNull())
                {
                    DocumentIsLatest(itm, autoSaveRow);
                }

                atriumDB.EFileRow efr = dsA.EFile.FindByFileId(itm.FileId);
                if (efr == null)
                {
                    try
                    {
                        efr = AtMng.GetFile(itm.FileId).CurrentFile;
                    }
                    catch (Exception x)
                    {
                        efr = null;
                    }
                }

                if (efr == null)
                {
                    autoSaveRow.FileName       = LawMate.Properties.Resources.DELETEDFILE;
                    autoSaveRow.FullFileNumber = LawMate.Properties.Resources.DELETEDFILE;
                    autoSaveRow.RowError       = LawMate.Properties.Resources.CannotResumeThisActivity;
                }
                else
                {
                    autoSaveRow.FileName       = efr.NameE;
                    autoSaveRow.FullFileNumber = efr.FullFileNumber;
                }

                AutoSaveDT.AddAutoSaveRow(autoSaveRow);
            }
            AutoSaveDT.EndLoadData();
        }
Ejemplo n.º 21
0
        private void ddLookupBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            if (CurrentRowddLookup().LookupType == "GEN")
            {
                ddGenericGridEX.Visible = true;
                gridEX1.Visible         = false;
                cmdDeleteItem.Enabled   = Janus.Windows.UI.InheritableBoolean.True;
                cmdNewGeneric.Enabled   = Janus.Windows.UI.InheritableBoolean.True;
            }
            else
            {
                ddGenericGridEX.Visible = false;
                gridEX1.Visible         = true;
                cmdDeleteItem.Enabled   = Janus.Windows.UI.InheritableBoolean.False;
                cmdNewGeneric.Enabled   = Janus.Windows.UI.InheritableBoolean.False;

                DataTable ds = AtMng.GetddLookup().Codes(CurrentRowddLookup().LookupName, AtMng.GetFile());
                bindingSource1.DataSource = ds;
                gridEX1.DataSource        = ds;


                gridEX1.RetrieveStructure(true);

                //foreach (Janus.Windows.GridEX.GridEXColumn gc in gridEX1.Tables[1].Columns)
                //{
                //    gc.EditType = Janus.Windows.GridEX.EditType.NoEdit;
                //    if (gc.DataTypeCode == TypeCode.DateTime)
                //        gc.FormatString = "g";

                //}
            }
        }
Ejemplo n.º 22
0
        private void btnRun_Click(object sender, EventArgs e)
        {
            try
            {
                List <DataRow> toAction = UIHelper.GridGetSelectedData(gridFileList);
                toAction.RemoveAll(RemoveSuccess);

                if (toAction.Count > 0 && MessageBox.Show("Are you sure you want to proceed?  You have selected " + toAction.Count.ToString() + " files.", "Mass Activity", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                {
                    string massMailingPath = null;

                    ActivityConfig.ACSeriesRow acsr = SelectedACSeries();
                    ACEngine ace = new ACEngine(fmCurrent);
                    ace.TestForSteps(acsr.ACSeriesId);
                    if (ace.HasDoc && chkConcatenate.Checked)
                    {
                        SaveFileDialog saveFileDialog1 = new SaveFileDialog();
                        saveFileDialog1.Filter   = "rtf files (*.rtf)|*.rtf|All files (*.*)|*.*";
                        saveFileDialog1.FileName = "Merge_" + acsr.StepCode.Replace(".", "") + "_" + DateTime.Today.ToString("yyyyMMdd") + ".rtf";
                        if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                        {
                            massMailingPath = saveFileDialog1.FileName;
                        }
                    }

                    docDB.DocumentRow doc2Copy = null;
                    if (acsr.ACSeriesId == AtMng.GetSetting(AppIntSetting.DocumentCopyAcId))
                    {
                        fBrowseDocs fdoc = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog;
                        massMailingPath = null;
                        if (fdoc.ShowDialog(this) == DialogResult.OK && fdoc.SelectedDocuments() != null)
                        {
                            doc2Copy = fdoc.SelectedDocument;
                        }
                        else
                        {
                            MessageBox.Show("You can't proceed without selecting a document.", "Mass Activity", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                            return;
                        }
                    }

                    //if (ctx != null && ctx.Count > 0)
                    //{
                    //we need to prompt for input
                    //launch wiz for first file to capture user input
                    lmDatasets.appDB.EFileSearchRow efsr = (lmDatasets.appDB.EFileSearchRow)toAction[0];

                    FileManager fmFirst = AtMng.GetFile(efsr.FileId);
                    fACWizard   facw;
                    lmDatasets.atriumDB.ActivityRow newAC = null;
                    if (doc2Copy != null)
                    {
                        docDB.DocumentRow docCopy = fmFirst.GetDocMng().GetDocument().MakeCopy(doc2Copy, fmFirst.CurrentFile, doc2Copy.IsDraft);
                        facw = new fACWizard(fmFirst, ACEngine.Step.Document, acsr.ACSeriesId, docCopy.DocId, "REVISE");
                    }
                    else
                    {
                        facw = new fACWizard(fmFirst, ACEngine.Step.ACInfo, acsr.ACSeriesId);
                    }
                    facw.ctx = ctx;
                    if (facw.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                    {
                        //get newly added activity
                        newAC        = fmFirst.DB.Activity[fmFirst.DB.Activity.Count - 1];
                        efsr.Result  = "Success";
                        efsr.Message = "Prototype activity";
                        efsr.EndEdit();
                        toAction.Remove(efsr);
                    }
                    else
                    {
                        MessageBox.Show("You can't proceed without completing the prototype activity.", "Mass Activity", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        return;
                    }

                    //}

                    using (fWait fProgress = new fWait("Generating activities, please wait"))
                    {
                        AtMng.MassActivity(toAction, acsr, (string)uiTemplate.SelectedValue, massMailingPath, 0, ACEngine.RevType.Document, ctx, doc2Copy, newAC);
                    }
                }
                else if (toAction.Count == 0)
                {
                    MessageBox.Show("No files selected", "Mass Activity", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 23
0
        private void setFilePropertiesFromXML(FileManager fm, XmlDocument efileXml, string fileMetaType, string foldername)
        {
            appDB.EFileSearchRow efs      = fm.EFile.GetEfileParentRow(fm.CurrentFile);
            FileManager          fmParent = AtMng.GetFile(efs.FileId);

            atriumDB.EFileRow pFile = fmParent.CurrentFile;
            if (pFile.NameE == "[NameNotSet]")
            {
                //set name properly
                string filenum = getNodeValue(efileXml, "FileNo2");

                string fileopened = getNodeValue(efileXml, "FileOpenDate");
                string fileclosed = getNodeValue(efileXml, "FileCloseDate");

                if (!string.IsNullOrEmpty(fileopened))
                {
                    DateTime fileOpenedDate = DateTime.ParseExact(fileopened, "dd/MM/yyyy hh:mm:ss tt", provider);
                    pFile.OpenedDate = fileOpenedDate;
                }
                if (!string.IsNullOrEmpty(fileclosed))
                {
                    DateTime fileClosedDate = DateTime.ParseExact(fileclosed, "dd/MM/yyyy hh:mm:ss tt", provider);
                    pFile.ClosedDate = fileClosedDate;
                    pFile.CloseCode  = "800";
                }

                pFile.StatusCode = (getNodeValue(efileXml, "Status") == "Open") ? "O" : "C";

                string fileDesc = getNodeValue(efileXml, "FileDescription");

                if (fileDesc.Length > 0)
                {
                    pFile.DescriptionE = fileDesc;
                }

                if (filenum.IndexOf(" ") == -1)
                {
                    pFile.FileNumber = filenum;
                }
                else
                {
                    pFile.FileNumber = filenum.Substring(0, filenum.IndexOf(" "));
                }

                pFile.NameE    = getNodeValue(efileXml, "Subject");
                pFile.NameF    = pFile.NameE;
                pFile.FileType = "F";

                if (!string.IsNullOrEmpty(fileMetaType))
                {
                    pFile.MetaType = fileMetaType;
                }

                //fileAKA
                string FileNo = getNodeValue(efileXml, "FileNo");
                if (!string.IsNullOrEmpty(FileNo) || FileNo != "-")
                {
                    //create new AKA record using FileNo
                }
                atLogic.BusinessProcess bp = fmParent.GetBP();

                bp.AddForUpdate(fmParent.EFile);
                bp.AddForUpdate(fmParent.GetFileXRef());
                bp.AddForUpdate(fmParent.GetFileOffice());

                bp.Update();
            }

            //TODO: Identify other properties and decide how to handle ones that don't have a home (e.g. new entity? store in xml file like extract from lotus?)
        }
Ejemplo n.º 24
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdPrintGrid":
                    if (gridEXPrintDocument1.GridEX == null)
                    {
                        gridEXPrintDocument1.GridEX = ucRecordList1.RecordsGridEx;
                    }
                    UIHelper.GridExPrintDocument(gridEXPrintDocument1);
                    break;

                case "cmdPrintPreview":
                    if (gridEXPrintDocument1.GridEX == null)
                    {
                        gridEXPrintDocument1.GridEX = ucRecordList1.RecordsGridEx;
                    }
                    UIHelper.GridExPrintPreview(gridEXPrintDocument1);
                    break;

                case "cmdFirstHit":
                    MoveToDoc(FullTextNavigation.MoveFirst, false);
                    break;

                case "cmdPrevHit":
                    MoveToHit(MoveHit.MovePrevious);
                    break;

                case "cmdNextHit":
                    MoveToHit(MoveHit.MoveNext);
                    break;

                case "cmdLastHit":
                    MoveToDoc(FullTextNavigation.MoveLast, true);
                    break;

                case "cmdFirst":
                    MoveToDoc(FullTextNavigation.MoveFirst, false);
                    break;

                case "cmdPrev":
                    MoveToDoc(FullTextNavigation.MovePrevious, false);
                    break;

                case "cmdNext":
                    MoveToDoc(FullTextNavigation.MoveNext, false);
                    break;

                case "cmdLast":
                    MoveToDoc(FullTextNavigation.MoveLast, false);
                    break;

                case "tsJump":
                    fFile f = MainForm.OpenFile(CurrentRow().FileId);
                    f.MoreInfo("document", CurrentRow().DocId);

                    break;

                case "tsRevise":
                    lmWinHelper.ReviseDocument(AtMng.GetFile(CurrentRow().FileId), CurrentRow().DocId);
                    break;

                case "cmdGridExFilter":
                    if (e.Command.IsChecked)
                    {
                        ucRecordList1.RecordsGridEx.FilterMode = Janus.Windows.GridEX.FilterMode.Automatic;
                    }
                    else
                    {
                        ucRecordList1.RecordsGridEx.FilterMode = Janus.Windows.GridEX.FilterMode.None;
                    }
                    break;

                case "cmdGridExGroupBy":
                    if (e.Command.IsChecked)
                    {
                        ucRecordList1.RecordsGridEx.GroupByBoxVisible = true;
                    }
                    else
                    {
                        ucRecordList1.RecordsGridEx.RootTable.Groups.Clear();
                        ucRecordList1.RecordsGridEx.GroupByBoxVisible = false;
                    }
                    break;

                case "cmdFldChooser":
                    ucRecordList1.RecordsGridEx.ShowFieldChooser(this);
                    break;

                case "tsCloseResults":
                    this.Close();
                    break;

                case "tsHitHilite":
                    SetPreview(tsHitHilite.IsChecked);
                    break;

                case "tsPreview":
                    SetPreview(tsPreview1.IsChecked);
                    break;

                case "tsReviseSearchCriteria":
                    if (!myfAS.IsDisposed)
                    {
                        MainForm.Focus();
                        myfAS.Activate();
                    }
                    else
                    {
                        MessageBox.Show(LawMate.Properties.Resources.TheAdvancedSearchScreenIsNoLongerAccessible, LawMate.Properties.Resources.AdvancedSearchScreenNotAccessible, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        tsReviseSearchCriteria.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                    }
                    break;

                case "tsShowDetails":
                    if (tsShowDetails.IsChecked)
                    {
                        pnlResultDetails.Closed = false;
                    }
                    else
                    {
                        pnlResultDetails.Closed = true;
                    }
                    break;

                case "cmdJumptToActivity":
                    MainForm.OpenFile(CurrentRow().FileId);
                    break;

                case "cmdToggleHighlight":
                    if (!cmdToggleHighlight.IsChecked)
                    {
                        IsFullTextSearch = false;    //Suspend IsFullTextSearch so preview shows doc in proper ucdoc doc display control
                        PreviewCurrentDoc();
                        IsFullTextSearch = true;     //Set IsFullTextSearch back to original value
                    }
                    else
                    {
                        PreviewCurrentDoc();
                    }
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 25
0
        public fOfficerPreferences(Form f)
            : base(f)
        {
            InitializeComponent();

            officerPrefsBindingSource.DataSource = AtMng.OfficeMng.DB;
            officerPrefsBindingSource.DataMember = AtMng.OfficeMng.DB.OfficerPrefs.TableName;
            UIHelper.ComboBoxInit("vofficerlist", officerPrefsGridEX.DropDowns["ddOfficer"], AtMng.GetFile());

            AtMng.OfficeMng.GetOfficerPrefs().Load();
        }
Ejemplo n.º 26
0
        private void runImport(ImportSource sourceData)
        {
            iCount = 0;
            iFiles = 0;
            DateTime start = DateTime.Now;


            FileManager fmRoot;

            if (ebParentFileID.Text.Length > 0)
            {
                fmRoot = AtMng.GetFile(Convert.ToInt32(ebParentFileID.Text));
            }
            else
            {
                fmRoot = AtMng.GetFile((int)ucDest.FileId);
            }

            acsr = AtMng.acMng.DB.ACSeries.FindByACSeriesId((int)ucMultiDropDown1.SelectedValue);

            switch (sourceData)
            {
            case ImportSource.LocalPath:
                MakeFile(ebImportFile.Text, fmRoot);
                break;

            case ImportSource.LotusPrePass:
                string ExtFilePath = Path.Combine("C:\\AtriumFileExtensionRejects", "FileExtRejects.txt");
                ExtTW = new StreamWriter(ExtFilePath);
                ImportPrepass(AtMng, ebImportFile.Text);
                ExtTW.Close();
                break;

            case ImportSource.LotusEmptyFolderFinder:
                string ExtFilePath2 = Path.Combine("C:\\AtriumRejects", "emptyDiskFoldersFromLotusExtract.txt");
                ExtTW = new StreamWriter(ExtFilePath2);
                CheckForEmptyLotusFolder(AtMng, ebImportFile.Text);
                ExtTW.Close();
                break;

            case ImportSource.LotusNotes:
                DateTime dt  = DateTime.Now;
                string   sDt = dt.ToString("yyyy-MM-dd hh_mm");
                string   PathToListOfDocsWithModifiedDocDate = "C:\\AtriumFileExtensionRejects\\ListOfDocsWithModifiedDocDate" + sDt + ".txt";
                DocsWithModifiedDocDate = new StreamWriter(PathToListOfDocsWithModifiedDocDate);
                StartPath = ebStartAt.Text;
                if (StartPath.Length > 0)
                {
                    isOkToContinue = false;
                }
                MakeLotusFile(ebImportFile.Text, fmRoot);
                DocsWithModifiedDocDate.Close();
                break;

            case ImportSource.InfoBank:
                MessageBox.Show("InfoBank import not implemented");
                break;
            }
            AddListItem(iFiles.ToString() + " files created in Atrium");
            AddListItem(iCount.ToString() + " documents created in Atrium");
            TimeSpan ts = DateTime.Now.Subtract(start);

            AddListItem(ts.ToString() + " elapsed time");
        }