Пример #1
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.Debtor.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else if (FM.DB.Address.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.debtorBindingSource.EndEdit();
                    this.addressBindingSource.EndEdit();

                    FM.SaveAll();

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #2
0
        public void Init(atriumBE.FileManager fm, fFile parentFile)
        {
            fmCurrent = fm;
            Atmng     = fm.AtMng;

            ParentFile = parentFile;
            fileId     = fm.CurrentFile.FileId;


            if (UIHelper.getScalingFactor() > 1)
            {
                tvContents.ItemHeight = tvContents.ItemHeight + 2;
            }

            //JLL 2015-08-30 higher dpi setting handling
            //defaultTopHeight = UIHelper.AdjustHeightInt(this, defaultTopHeight);
            //defaultRowHeight = UIHelper.AdjustHeightInt(this, defaultRowHeight);
            //END JLL 2015-08-30


            // WI 75873
            if (fm.GetSSTMng() != null && !fm.CurrentFile.IsDim2IdNull())
            {
                programId = fm.CurrentFile.Dim2Id;
            }
            // -- end // WI 75873

            fm.EFile.OnUpdate += new atLogic.UpdateEventHandler(EFile_OnUpdate);
            fm.GetFileXRef().OnUpdate += new atLogic.UpdateEventHandler(ucToC_OnUpdate);

            LoadTOC();
        }
Пример #3
0
        public override void ApplyBR(bool DataNotDirty)
        {
            fFile f = FileForm();

            if (f != null)
            {
                f.IsDirty = !DataNotDirty;

                if (f.ReadOnly)
                {
                    return;
                }

                f.fileToc.Enabled = DataNotDirty;
                f.EditModeTitle(!DataNotDirty);
            }

            if (DataNotDirty)
            {
                tsDelete.Enabled   = Janus.Windows.UI.InheritableBoolean.True;
                tsEditMode.Visible = Janus.Windows.UI.InheritableBoolean.False;
            }
            else
            {
                tsDelete.Enabled   = Janus.Windows.UI.InheritableBoolean.False;
                tsEditMode.Visible = Janus.Windows.UI.InheritableBoolean.True;
            }
        }
Пример #4
0
        public override void Delete()
        {
            try
            {
                if (atriumDB_CompOfferDetailDataTableBindingSource.Count > 0)
                {
                    throw new LMException("Must delete offer details before deleting a compromise offer record");
                }
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    atriumDB_CompOfferDataTableBindingSource.EndEdit();

                    FM.SaveAll();

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Пример #5
0
        public override void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    //TFS#51604 CJW 2013-8-21
                    //added check to make sure it is related to the filecontact being deleted 
                    if (CurrentRowFP() != null && CurrentRowFP().FileContactId==CurrentRow().FileContactid)
                        CurrentRowFP().Delete();

                    CurrentRow().Delete();
                    filePartyBindingSource.EndEdit();
                    fileContactBindingSource.EndEdit();

                    FM.SaveAll();
                  

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
              
               throw x;
            }
        }
Пример #6
0
        public override void ApplyBR(bool DataNotDirty) //SRP
        {
            fFile f = FileForm();

            if (f != null)
            {
                f.IsDirty = !DataNotDirty;

                if (f.ReadOnly)
                {
                    return;
                }

                f.fileToc.Enabled = DataNotDirty;
                f.EditModeTitle(!DataNotDirty);
            }


            //if (DataNotDirty)
            //    tsEditmode.Visible = Janus.Windows.UI.InheritableBoolean.False;
            //else
            //    tsEditmode.Visible = Janus.Windows.UI.InheritableBoolean.True;

            lmWinHelper.EditModeCommandToggle(tsEditmode, !DataNotDirty);
        }
Пример #7
0
        public override void Save()
        {
            if (SSTM.DB.SSTRequest.HasErrors || SSTM.DB.SSTReqRecipient.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(SSTM.DB);
            }
            else
            {
                try
                {
                    sSTRequestGridEX.UpdateData();
                    this.sSTRequestBindingSource.EndEdit();

                    FM.SaveAll();
                    //atLogic.BusinessProcess bp = FM.GetBP();

                    //bp.AddForUpdate(SSTM.GetSSTRequest());
                    //bp.AddForUpdate(SSTM.GetSSTReqRecipient());
                    //bp.AddForUpdate(FM.EFile);
                    //bp.Update();


                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #8
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.Debt.HasErrors || FM.GetCLASMng().DB.AccountHistory.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    debtBindingSource.EndEdit();
                    accountHistoryBindingSource.EndEdit();

                    //atLogic.BusinessProcess bp = FM.GetBP();

                    //bp.AddForUpdate(FM.GetCLASMng().GetDebt());
                    //bp.AddForUpdate(FM.GetCLASMng().GetAccountHistory());
                    //bp.AddForUpdate(FM.GetActivityBF());
                    //bp.AddForUpdate(FM.EFile);

                    //bp.Update();

                    FM.SaveAll();

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #9
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.Judgment.HasErrors || FM.GetCLASMng().DB.JudgmentAccount.HasErrors || FM.GetCLASMng().DB.Cost.HasErrors || FM.GetCLASMng().DB.Writ.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    this.atriumDB_JudgmentDataTableBindingSource.EndEdit();
                    this.atriumDB_JudgmentAccountDataTableBindingSource.EndEdit();
                    this.atriumDB_CostDataTableBindingSource.EndEdit();
                    this.atriumDB_WritDataTableBindingSource.EndEdit();


                    FM.SaveAll();

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                    ApplyBR(true);
                    ApplyBRJudgment();
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
Пример #10
0
        public override void Save()
        {
            if (FM.GetAdvisoryMng().DB.Opinion.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.opinionBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetAdvisoryMng().GetOpinion());
                    bp.AddForUpdate(FM.GetDocMng().GetDocument());
                    bp.AddForUpdate(FM.GetDocMng().GetDocContent());
                    bp.AddForUpdate(FM.GetActivityBF());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();



                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #11
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.CompOffer.HasErrors || FM.GetCLASMng().DB.CompOfferDetail.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    atriumDB_CompOfferDataTableBindingSource.EndEdit();
                    atriumDB_CompOfferDetailDataTableBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();

                    bp.AddForUpdate(FM.GetCLASMng().GetCompOffer());
                    bp.AddForUpdate(FM.GetCLASMng().GetCompOfferDetail());
                    bp.AddForUpdate(FM.EFile);

                    bp.Update();

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #12
0
        public override void Save()
        {
            if (SSTM.DB.SSTCase.HasErrors || SSTM.DB.SSTCaseMatter.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(SSTM.DB);
            }
            else if (FM.DB.FileXRef.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.SSTCaseBindingSource.EndEdit();
                    this.ucSSTCaseMatterIssues.sSTCaseMatterBindingSource.EndEdit();

                    FM.SaveAll();
                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #13
0
        public override void Save()
        {
            if (FM.DB.FileOffice.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    fileOfficeBindingSource.EndEdit();

                    FM.SaveAll();
                    //atLogic.BusinessProcess bp = FM.GetBP();
                    //bp.AddForUpdate(FM.GetFileOffice());
                    //bp.AddForUpdate(FM.EFile);
                    //bp.Update();
                    ApplyBR(true);

                    f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
Пример #14
0
        public override void Save()
        {
            if (FM.LeadOfficeMng.DB.Office.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.officeBindingSource.EndEdit();
                    this.addressBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.LeadOfficeMng.GetOffice());
                    bp.AddForUpdate(FM.GetAddress());
                    bp.Update();



                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #15
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;

                case "cmdViewSRP":
                    atriumDB.SRPRow srprow           = FM.GetSRP().Load(CurrentRow().SRPID);
                    fFile           agentBillingFile = FileForm().MainForm.OpenFile(srprow.FileID);
                    agentBillingFile.MoreInfo("srp", srprow.SRPID);
                    break;

                case "cmdSRPDetail":
                    atriumDB.SRPRow srprow2           = FM.GetSRP().Load(CurrentRow().SRPID);
                    fFile           agentBillingFile2 = FileForm().MainForm.OpenFile(srprow2.FileID);
                    agentBillingFile2.MoreInfo("srpdetail", srprow2.SRPID);
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #16
0
        public override void Save()
        {
            if (FM.DB.RiskAssessment.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.riskAssessmentBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetRiskAssessment());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();


                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
Пример #17
0
        public override void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    riskAssessmentBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetRiskAssessment());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();



                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Пример #18
0
        public override void Delete()
        {
            try
            {
                if (accountHistoryBindingSource.Count > 0)
                {
                    throw new LMException(LawMate.Properties.Resources.UIDeleteAccountHistoryBeforeAccount);
                }
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    debtBindingSource.EndEdit();

                    FM.SaveAll();

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Пример #19
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);
                    }
                }
            }
        }
Пример #20
0
        public override void ApplyBR(bool DataNotDirty)
        {
            fFile f = FileForm();

            if (f != null)
            {
                f.IsDirty = !DataNotDirty;

                if (f.ReadOnly)
                {
                    return;
                }

                f.fileToc.Enabled = DataNotDirty;
                f.EditModeTitle(!DataNotDirty);
            }

            if (DataNotDirty)
            {
                tsDelete.Enabled = Janus.Windows.UI.InheritableBoolean.True;
                InEditMode       = false;
            }
            else
            {
                tsDelete.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                InEditMode       = true;
            }
            lmWinHelper.EditModeCommandToggle(tsEditmode, InEditMode);
        }
Пример #21
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdDeleteSuspendedAC":
                    DeleteSuspendedActivity();
                    break;

                case "cmdResume":
                    ResumeActivity();
                    break;

                case "cmdJumpToFile":
                    ACEState aces = ACEStateDictionnary[CurrentRow().ActivityId];
                    fFile    f    = MainForm.OpenFile(aces.FileId);
                    break;

                case "cmdRefresh":
                    LoadData();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #22
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.Insolvency.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    this.insolvencyBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetCLASMng().GetInsolvency());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();
                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Пример #23
0
        public override void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    this.opinionBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetAdvisoryMng().GetOpinion());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();


                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Пример #24
0
        private void Save(atriumBE.FileManager contextFM)
        {
            //atriumBE.FileManager contextFM = FM.AtMng.GetFile(CurrentRow().FileId);

            if (contextFM.DB.Appointment.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(contextFM.DB);
            }
            else
            {
                try
                {
                    this.AppointmentBindingSource.EndEdit();

                    contextFM.SaveAll();
                    ApplyBR(true);

                    if (!isOfficerCal)
                    {
                        fFile f = (fFile)this.ParentForm;
                        f.fileToc.LoadTOC();
                    }
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
            CreateAddNewAppointMenu();
        }
Пример #25
0
        public override void Save()
        {
            if (FM.DB.EFile.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    eFileBindingSource.EndEdit();
                    fileAKABindingSource.EndEdit();

                    archiveBatchBindingSource.EndEdit();

                    FM.SaveAll();
                    //atLogic.BusinessProcess bp = FM.GetBP();
                    //bp.AddForUpdate(FM.GetFileContact());
                    //bp.AddForUpdate(FM.EFile);
                    //bp.AddForUpdate(FM.GetFileAKA());
                    //bp.Update();


                    //      FM.GetFileAKA().LoadByFileId(FM.CurrentFile.FileId);
                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    //f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
Пример #26
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "tsSaveIRP":
                    SaveIRP();
                    break;

                case "tsDeleteIRP":
                    DeleteIRP();
                    break;

                case "tsNewIRP":
                    NewIRP();
                    break;

                case "tsGoToBillingReview":
                    if (myOfficeMan.CurrentOffice.UsesBilling)
                    {
                        ucBase             ctl   = FileForm().MoreInfo("billingreview");
                        ucSRPBillingReview brCtl = (ucSRPBillingReview)ctl;
                        brCtl.MoreInfo("billingreview", CurrentRowIRP().SRPID, CurrentRowIRP().IRPId);
                    }
                    break;

                case "tsGoToSRP":
                    FileForm().MoreInfo("srp", CurrentRowIRP().SRPID);
                    break;

                case "cmdJumpToActivity":
                    fFile nFile = FileForm().MainForm.OpenFile(CurrentRowIRP().FileID);
                    nFile.MoreInfo("activity");
                    break;

                case "cmdJumpToTaxation":
                    fFile nFile1 = FileForm().MainForm.OpenFile(CurrentRowIRP().FileID);
                    nFile1.MoreInfo("irp", CurrentRowIRP().IRPId);
                    break;
                }
                if (e.Command.Key.StartsWith("cmdTaxRec"))
                {
                    CLAS.TaxingRow tr    = (CLAS.TaxingRow)e.Command.Tag;
                    fFile          nFile = FileForm().MainForm.OpenFile(tr.FileID);
                    nFile.MoreInfo("taxing", tr.TaxingID);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #27
0
        public virtual void ApplyBR(bool DataNotDirty)
        {
            fFile f = FileForm();

            if (f != null)
            {
                f.IsDirty = !DataNotDirty;
            }
        }
Пример #28
0
 private void JumpToFile()
 {
     if (this.ParentForm.GetType() == typeof(fCalendar) && IsOfficerCal && CurrentRow() != null)
     {
         fCalendar fcal = (fCalendar)this.ParentForm;
         fFile     f    = fcal.MainForm.OpenFile(CurrentRow().FileId);
         f.MoreInfo("appointment", CurrentRow().ApptId);
     }
 }
Пример #29
0
 private void btnJumpToIRP_Click(object sender, EventArgs e)
 {
     try
     {
         fFile fileToView = FileForm().MainForm.OpenFile(CurrentRow().FileID);
         fileToView.MoreInfo("irp", CurrentRow().IRPId);
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Пример #30
0
 private void ucRecordList1_RowDoubleClicked(object sender, Janus.Windows.GridEX.RowActionEventArgs e)
 {
     try
     {
         docDB.DocumentRow dr = (docDB.DocumentRow)((DataRowView)this.documentBindingSource.Current).Row;
         fFile             f  = MainForm.OpenFile(dr.FileId);
         f.MoreInfo("document", dr.DocId);
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }