コード例 #1
0
 private void btnAssignAppeals_Click(object sender, EventArgs e)
 {
     try
     {
         List <DataRow> rowList = UIHelper.GridGetSelectedData(grexAppealsReadyForAssignment);
         if (rowList.Count > 0)
         {
             Application.UseWaitCursor = true; Cursor = Cursors.WaitCursor;
             using (fWait fProgress = new fWait(LawMate.Properties.Resources.waitLoading))
             {
                 myMemMng.CreateBatchRecord(rowList);
             }
             grexAppealsReadyForAssignment.UpdateData();
             this.tribunalMemberAssignmentBindingSource.EndEdit();
             myMemMng.LoadTribunalMemberAssignment();
             updateTribunalMemberAssignmentCounter();
             tribunalMemberWorkloadBindingSource.DataSource = myMemMng.LoadTribunalMemberWorkload();
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
     finally
     {
         Application.UseWaitCursor = false; Cursor = Cursors.Default;
     }
 }
コード例 #2
0
        private void Init(fAdvancedSearch referrer, string fullText)
        {
            LoadLabels();
            dm = this.AtMng.GetFile().GetDocMng();
            //ucDoc1.Init(dm);
            //ucDoc1.ReturnFocusTo = ucRecordList1;
            ucDocView1.Init(dm);
            ucDocView1.ReturnFocusTo = ucRecordList1;

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

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

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

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

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

                cmdPrevHit.Visible         = Janus.Windows.UI.InheritableBoolean.True;
                cmdNextHit.Visible         = Janus.Windows.UI.InheritableBoolean.True;
                cmdFirstHit.Visible        = Janus.Windows.UI.InheritableBoolean.True;
                cmdLastHit.Visible         = Janus.Windows.UI.InheritableBoolean.True;
                cmdToggleHighlight.Visible = Janus.Windows.UI.InheritableBoolean.True;
                SetPreview(true);
            }
            else
            {
                tsHitHilite.Visible        = Janus.Windows.UI.InheritableBoolean.False;
                pnlLeft.Closed             = true;
                cmdPrevHit.Visible         = Janus.Windows.UI.InheritableBoolean.False;
                cmdNextHit.Visible         = Janus.Windows.UI.InheritableBoolean.False;
                cmdFirstHit.Visible        = Janus.Windows.UI.InheritableBoolean.False;
                cmdLastHit.Visible         = Janus.Windows.UI.InheritableBoolean.False;
                cmdToggleHighlight.Visible = Janus.Windows.UI.InheritableBoolean.False;
            }
        }
コード例 #3
0
        private void editBox1_ButtonClick(object sender, EventArgs e)
        {
            openFileDialog1.FileName    = "";
            openFileDialog1.Multiselect = false;

            if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                using (fWait fw = new fWait(LawMate.Properties.Resources.waitLoading))
                {
                    FileName = openFileDialog1.FileName;
                }
            }
        }
コード例 #4
0
 private void grexAppealsReadyForAssignment_LinkClicked(object sender, ColumnActionEventArgs e)
 {
     try
     {
         using (fWait fProgress = new fWait(LawMate.Properties.Resources.waitLoading))
         {
             this.MainForm.OpenFile(CurrentRow().FileId);
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #5
0
 private void gridFileList_LinkClicked(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
 {
     try
     {
         using (fWait fProgress = new fWait(LawMate.Properties.Resources.waitLoading))
         {
             this.MainForm.OpenFile(CurrentRow().FileId);
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #6
0
 private void officeGridEX_LinkClicked(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
 {
     try
     {
         using (fWait fProgress = new fWait(LawMate.Properties.Resources.waitLoading))
         {
             fFile f = fMain.Main.OpenFile(selectedOffice.OfficeFileId);
             f.MoreInfo("officer");
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #7
0
 private void gridEX1_RowDoubleClick(object sender, Janus.Windows.GridEX.RowActionEventArgs e)
 {
     try
     {
         using (fWait fwait = new fWait(LawMate.Properties.Resources.waitLoading))
         {
             if (gridEX1.GetRow().RowType == Janus.Windows.GridEX.RowType.Record)
             {
                 CheckForMandateReturn();
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #8
0
 private void gridEX1_ColumnButtonClick(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
 {
     try
     {
         using (fWait fwait = new fWait(LawMate.Properties.Resources.waitLoading))
         {
             if (e.Column.Key == "AcSeriesId")
             {
                 CheckForMandateReturn();
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
コード例 #9
0
 private void btnSaveTentativeMembers_Click(object sender, EventArgs e)
 {
     try
     {
         using (fWait fProgress = new fWait(LawMate.Properties.Resources.waitLoading))
         {
             SaveTentativeMember();
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
     finally
     {
         Application.UseWaitCursor = false; Cursor = Cursors.Default;
     }
 }
コード例 #10
0
        public fReportList(Form f)
            : base(f)
        {
            InitializeComponent();

            fwait = new fWait(LawMate.Properties.Resources.ReportConnectingToServer);
            fwait.Show();
            fwait.Refresh();

            GetRS();

            fwait.setMessageText(LawMate.Properties.Resources.ReportRetrievingList);
            fwait.Refresh();

            ListRSFolders("/", treeView1.Nodes[0]);
            treeView1.ExpandAll();
            fwait.Hide();
        }
コード例 #11
0
 private void HookupfProgress(fMain f)
 {
     fProgress = f.FProgress;
 }
コード例 #12
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);
            }
        }
コード例 #13
0
        private void DoMove()
        {
            fWait fProgress = new fWait();

            try
            {
                if (fileBrowser == null)
                {
                    fileBrowser = new fBrowse(myFM.AtMng, 0, false, false, false, true);
                }

                fileBrowser.FindFile(myFM.CurrentFileId);
                if (fileBrowser.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    Cursor.Current = Cursors.WaitCursor;

                    //make dict of rows
                    Dictionary <int, appDB.EFileSearchRow> FilesToMove = new Dictionary <int, appDB.EFileSearchRow>();
                    foreach (Janus.Windows.GridEX.GridEXSelectedItem gsi in eFileSearchGridEX.SelectedItems)
                    {
                        appDB.EFileSearchRow efsr1 = (appDB.EFileSearchRow)((DataRowView)gsi.GetRow().DataRow).Row;
                        FilesToMove.Add(efsr1.FileId, efsr1);
                    }
                    try
                    {
                        foreach (appDB.EFileSearchRow efsr in FilesToMove.Values)
                        {
                            fProgress.setMessageText("Moving: " + efsr.Name);
                            fProgress.Show();
                            fProgress.Refresh();

                            FileManager filetomove1 = myFM.AtMng.GetFile(efsr.FileId);
                            //filetomove1.EFile.Move(filetomove1.CurrentFile, f.SelectedFile.FileId, true);
                            UIHelper.MoveFile(filetomove1, fileBrowser.SelectedFile.FileId);

                            atLogic.BusinessProcess bp = myFM.AtMng.GetBP();
                            bp.AddForUpdate(filetomove1.GetFileXRef());
                            bp.AddForUpdate(filetomove1.EFile);
                            bp.Update();
                        }
                    }
                    catch (Exception x)
                    {
                        myFM.DB.FileXRef.RejectChanges();
                        myFM.DB.EFile.RejectChanges();

                        Cursor.Current = Cursors.Default;
                        fProgress.Close();
                        UIHelper.HandleUIException(x);
                    }
                    Cursor.Current = Cursors.Default;
                    fProgress.Close();
                }
                LoadChildren(myFM);
            }
            catch (Exception x1)
            {
                fProgress.Close();
                throw x1;
            }
        }