Exemple #1
0
 void dt_ColumnChanged(object sender, DataColumnChangeEventArgs e)
 {
     if (FM.IsFieldChanged(e.Column, e.Row))
     {
         ApplyBR(false);
     }
 }
Exemple #2
0
        public void DoAutoAC(NextStep ns, ActivityConfig.ACSeriesRow asr, int revId, ACEngine.RevType revType, DateTime acDate)
        {
            try
            {
                if (ns == null)
                {
                    AutoAC(null, asr, revId, revType, acDate, null, true);
                }
                else
                {
                    AutoAC(ns.prevAc, asr, revId, revType, acDate, ns.FlowQ, true);
                }

                CurrentACE = null;

                FM.GetDocMng().DB.DocContent.AcceptChanges();
            }
            catch (Exception xx)
            {
                if (CurrentACE != null)
                {
                    CurrentACE.Cancel();
                }
                CurrentACE = null;

                throw xx;
            }
        }
Exemple #3
0
        private int UploadFile()
        {
            try
            {
                if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    string f = this.openFileDialog1.FileName;

                    docDB.DocumentRow newDoc = (docDB.DocumentRow)FM.GetDocMng().GetDocument().Add(FM.CurrentFile, f);

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetDocMng().GetDocContent());
                    bp.AddForUpdate(FM.GetDocMng().GetDocument());

                    bp.Update();

                    return(newDoc.DocId);
                }
                else
                {
                    return(0);
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Exemple #4
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;
                }
            }
        }
Exemple #5
0
        public void bindCBData(lmDatasets.CLAS.CBDetailDataTable a)
        {
            UIHelper.ComboBoxInit("CBInstrumentType", valuableTypeComboBox, FM);
            UIHelper.ComboBoxInit("CBNatureOfPayment", natureOfPaymentComboBox, FM);
            UIHelper.ComboBoxInit("CBPaymentSource", paymentSourceComboBox, FM);
            UIHelper.ComboBoxInit("CBStatus", statusCodeComboBox, FM);
            UIHelper.ComboBoxInit("CurrencyCode", currencyCodeComboBox, FM);
            ucOfficeSelectBox1.AtMng = FM.AtMng;

            UIHelper.ComboBoxInit("CBInstrumentType", cBDetailGridEX.DropDowns["ddCBInstrumentType"], FM);
            UIHelper.ComboBoxInit("CBNatureOfPayment", cBDetailGridEX.DropDowns["ddNatureOfPayment"], FM);
            UIHelper.ComboBoxInit("CBPaymentSource", cBDetailGridEX.DropDowns["ddCBPaymentSource"], FM);
            UIHelper.ComboBoxInit("vofficelist", cBDetailGridEX.DropDowns["ddOffice"], FM);
            UIHelper.ComboBoxInit("CBStatus", cBDetailGridEX.DropDowns["ddCBStatus"], FM);
            UIHelper.ComboBoxInit("CurrencyCode", cBDetailGridEX.DropDowns["ddCurrency"], FM);

            setBindingSources();

            a.ColumnChanged += new DataColumnChangeEventHandler(a_ColumnChanged);
            FM.GetCLASMng().GetCBDetail().OnUpdate += new atLogic.UpdateEventHandler(ucCashBlotter_OnUpdate);



            CalculateAllAndCompletedPayments();
            ApplySecurity(CurrentRow());
        }
Exemple #6
0
        public override void ApplySecurity(DataRow brow)
        {
            CLAS.CBDetailRow cbr = (CLAS.CBDetailRow)brow;
            UIHelper.EnableControls(cBDetailBindingSource, FM.GetCLASMng().GetCBDetail().CanEdit(cbr));

            btnGoToOfficeCB.Visible = FM.AllowedForOffice(cbr.OfficeID);
        }
Exemple #7
0
        private void countryCodeComboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            if (countryCodeComboBox.SelectedValue != null)
            {
                atLogic.WhereClause wc  = new atLogic.WhereClause();
                DataTable           dtC = FM.Codes("Province");
                wc.Add("CountryCode", "=", countryCodeComboBox.SelectedValue.ToString());
                DataView dvC = new DataView(dtC, wc.Filter(), "", DataViewRowState.CurrentRows);
                provinceCodeComboBox.SetDataBinding(dvC, "");
            }

            //provinceCodeComboBox.SetDataBinding(new DataView(FM.Codes("Province"), "CountryCode='" + countryCodeComboBox.SelectedValue + "'", "ProvinceCode", DataViewRowState.CurrentRows), "");

            if (countryCodeComboBox.Text == "Canada")
            {
                this.postalCodeEditBox.CharacterCasing = CharacterCasing.Upper;
                this.postalCodeEditBox.Mask            = "L0L 0L0";
            }
            else if (countryCodeComboBox.Text == "United States of America")
            {
                this.postalCodeEditBox.CharacterCasing = CharacterCasing.Upper;
                this.postalCodeEditBox.Mask            = "00000";
            }
            else
            {
                this.postalCodeEditBox.CharacterCasing = CharacterCasing.Normal;
                this.postalCodeEditBox.Mask            = "";
                this.ReqColor = Color.White;
            }
        }
Exemple #8
0
        public static void sound_reset()
        {
            switch (Machine.sBoard)
            {
            case "CPS-1":
                YM2151.ym2151_reset_chip();
                OKI6295.okim6295_reset();
                break;

            case "CPS-1(QSound)":
            case "CPS2":
                break;

            case "Neo Geo":
                FM.ym2610_reset_chip();
                break;

            case "Namco System 1":
                YM2151.ym2151_reset_chip();
                break;

            case "IGS011":
                OKI6295.okim6295_reset();
                break;

            case "PGM":
                ICS2115.ics2115_reset();
                break;
            }
        }
Exemple #9
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.CBDetail.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    cBDetailBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetCLASMng().GetCBDetail());
                    //    bp.AddForUpdate(FM.EFile);
                    bp.Update();

                    ApplyBR(true);
                    ApplyRowBR();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Exemple #10
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;
                }
            }
        }
Exemple #11
0
        public override double GenerateValue()
        {
            StartPhase += 2.0 * Math.PI * Frequence * (1.0 + (FM?.GenerateValue() ?? 0.0)) / ValuesCount;
            double cycle = 2.0 * Math.PI;

            return((StartPhase % cycle) / cycle > PulseTime ? 0.0 : Amplitude);
        }
Exemple #12
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;
            }
        }
Exemple #13
0
        public void BindData(atriumDB.FileContactDataTable dt)
        {
            sstMngr = FM.GetSSTMng();

            ucAddress1.FM = FM;
            addressBindingSource.DataMember = FM.DB.Address.TableName;
            addressBindingSource.DataSource = FM.DB;

            partyBindingSource.DataSource = dt.DataSet;
            partyBindingSource.DataMember = "Contact";

            filePartyBindingSource.DataSource = dt.DataSet;
            filePartyBindingSource.DataMember = dt.TableName;

            ucAddress1.DataSource = addressBindingSource;


            UIHelper.ComboBoxInit("vcontacttypeparty", contactTypeCodeucMultiDropDown, FM);
            UIHelper.ComboBoxInit("HearingMethod", mccHearingMethod, FM);
            UIHelper.ComboBoxInit("HearingMethod", filePartyGridEX.DropDowns["ddHearingMethod"], FM);
            UIHelper.ComboBoxInit("vcontacttypeparty", filePartyGridEX.DropDowns["ddContactType"], FM);

            UIHelper.ComboBoxInit("Sex", sexCodeucMultiDropDown, FM);
            UIHelper.ComboBoxInit("LanguageCode", languageCodeucMultiDropDown, FM);

            LoadContactIdDataView();

            dt.ColumnChanged            += new DataColumnChangeEventHandler(dt_ColumnChanged);
            FM.DB.Contact.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);
            FM.DB.Address.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);
            FM.GetFileContact().OnUpdate += new atLogic.UpdateEventHandler(ucFileParty_OnUpdate);
            FM.GetPerson().OnUpdate      += new atLogic.UpdateEventHandler(ucFileParty_OnUpdate);
            FM.GetAddress().OnUpdate     += new atLogic.UpdateEventHandler(ucFileParty_OnUpdate);
        }
Exemple #14
0
        public override void Save()
        {
            if (sstMngr.DB.FileParty.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(sstMngr.DB);
            }
            else
            {
                try
                {
                    filePartyBindingSource.EndEdit();
                    partyBindingSource.EndEdit();
                    addressBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();

                    bp.AddForUpdate(FM.GetFileContact());
                    bp.AddForUpdate(FM.GetPerson());
                    bp.AddForUpdate(FM.GetAddress());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();



                    ApplyBR(true);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Exemple #15
0
        public void bindCBData(CLAS.CashBlotterDataTable dt)
        {
            UIHelper.ComboBoxInit("CBInstrumentType", valuableTypeComboBox, FM);
            UIHelper.ComboBoxInit("CBInstrumentType", cBDetailGridEX.DropDowns["ddInstrumentType"], FM);
            UIHelper.ComboBoxInit("CBNatureOfPayment", natureOfPaymentComboBox, FM);
            UIHelper.ComboBoxInit("CBPaymentSource", paymentSourceComboBox, FM);
            UIHelper.ComboBoxInit("CBStatus", statusCodeComboBox, FM);
            UIHelper.ComboBoxInit("CurrencyCode", currencyCodeComboBox, FM);
            UIHelper.ComboBoxInit("vofficelist", mccOfficeCode, FM);

            ucContactSelectBox1.FM = FM;
            ucContactSelectBox2.FM = FM;

            setBindingSources();

            CLAS.CBDetailDataTable cbDetailDt;
            cbDetailDt = FM.GetCLASMng().DB.CBDetail;

            //CLAS.CashBlotterRow cr = (CLAS.CashBlotterRow)FM.GetCLASMng().GetCashBlotter().GetCurrentRow()[0];

            //cashBlotterBindingSource.Position= cashBlotterBindingSource.Find("CashBlotterID", cr.CashBlotterID);
            cbDetailDt.ColumnChanged += new DataColumnChangeEventHandler(cbDetailDt_ColumnChanged);

            FM.GetCLASMng().GetCashBlotter().OnUpdate += new atLogic.UpdateEventHandler(ucCashBlotterOffice_OnUpdate);
            FM.GetCLASMng().GetCBDetail().OnUpdate    += new atLogic.UpdateEventHandler(ucCashBlotterOffice_OnUpdate);

            ApplySecurity(CurrentRow());
            FileTreeView.BuildMenu(FM, tsActions, "CBOffice");
        }
Exemple #16
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;
            }
        }
Exemple #17
0
        public void bindDebtorData(CLAS.DebtorDataTable a)
        {
            UIHelper.ComboBoxInit("Sex", ucSexCodeMcc, FM);
            UIHelper.ComboBoxInit("LanguageCode", ucLanguageCodeMcc, FM);
            UIHelper.ComboBoxInit("AddressType", ucAddressTypeMcc, FM);
            UIHelper.ComboBoxInit("AddressSource", ucAddressSourceMcc, FM);
            UIHelper.ComboBoxInit("Province", addressGridEX.DropDowns["ddProvince"], FM);
            UIHelper.ComboBoxInit("Country", addressGridEX.DropDowns["ddCountry"], FM);
            UIHelper.ComboBoxInit("AddressType", addressGridEX.DropDowns["ddAddressType"], FM);

            this.debtorBindingSource.DataSource = a.DataSet;
            this.debtorBindingSource.DataMember = a.TableName;

            DataView dvAKA = new DataView(FM.DB.AKA, "ContactID=" + CurrentRow().ContactId.ToString(), "", DataViewRowState.CurrentRows);

            this.aKABindingSource.DataSource = dvAKA;

            DataView dvAddr = new DataView(FM.DB.Address, "ContactID=" + CurrentRow().ContactId.ToString(), "", DataViewRowState.CurrentRows);

            this.addressBindingSource.DataSource = dvAddr;

            ucAddress1.FM         = FM;
            ucAddress1.DataSource = addressBindingSource;

            FM.DB.Address.ColumnChanged += new DataColumnChangeEventHandler(Address_ColumnChanged);
            a.ColumnChanged             += new DataColumnChangeEventHandler(Address_ColumnChanged);

            FM.GetCLASMng().GetDebtor().OnUpdate += new atLogic.UpdateEventHandler(ucOpponent_OnUpdate);
            FM.GetAddress().OnUpdate             += new atLogic.UpdateEventHandler(ucOpponent_OnUpdate);

            SelectCurrentAddress();
            ValidateLastKnownAddress(CurrentRow());
        }
        //-------------------------------------------------------------------------------------------------
        private void lbTopOffset_Click(object sender, RoutedEventArgs e)
        {
            //
            double.TryParse(tbTopOffset.Text, out FM.m_stMasterOpt.dUtilOffset);

            FM.fn_LoadMastOptn(false);
        }
        public override double GenerateSample()
        {
            FiAngle += 2 * Math.PI * Frequency * (1 + (FM?.GenerateSample() ?? 0)) / SampleRate;
            var cycle = 2 * Math.PI;

            return((FiAngle % cycle) / cycle > DutyCycle ? 0.0 : Amplitude);
        }
Exemple #20
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;
            }
        }
Exemple #21
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;
                }
            }
        }
Exemple #22
0
        public override double GetData()
        {
            double tmp;

            if (FM != null)
            {
                current += Math.PI * 2.0d * frequency * (1 + FM.GetData()) / sampleCount;
            }
            else
            {
                current += Math.PI * 2.0d * frequency / sampleCount;
            }

            if (AM != null)
            {
                tmp = ((Math.Asin(Math.Sin(current)) * amplitude * (1 + AM.GetData()) * 2 / Math.PI));
            }
            else
            {
                tmp = ((Math.Asin(Math.Sin(current)) * amplitude * 2 / Math.PI));
            }



            // current += step;

            return(tmp);
        }
Exemple #23
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;
                }
            }
        }
Exemple #24
0
        //---------------------------------------------------------------------------
        private void UserButton_Click_6(object sender, RoutedEventArgs e)
        {
            if (!m_bConnect || m_nAxis < 0)
            {
                return;
            }

            //mc_Acs.fn_SetBuffer(m_nAxis, true); //HOME

            int nHomeNo = MOTR.ManNoHome((EN_MOTR_ID)m_nAxis);

            if (!fn_UserMsg($"{STRING_MOTOR_ID[m_nAxis]} Motor Home?", EN_MSG_TYPE.Check))
            {
                return;
            }

            SEQ.fn_Reset();

            if (nHomeNo == 32) //Z-Axis
            {
                if (SEQ_SPIND.fn_IsExistTool() && !FM.fn_IsLvlMaster())
                {
                    fn_UserMsg("Please remove tool");
                    return;
                }
            }
            MAN.fn_ManProcOn(nHomeNo, true, false);
        }
Exemple #25
0
        // event fired when yes/no radio buttons selected
        private void CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                EditableScreen(uirdbtnNo.Checked);

                foreach (SST.SSTCaseMatterRow row in FM.GetSSTMng().DB.SSTCaseMatter)
                {
                    if (CheckRowAttached(row))
                    {
                        row.ConfirmedByMemberId = confirmedByMemberId;
                    }
                }

                uirdbtnNo.Visible     = uirdbtnNo.Checked;
                uirdbtnYes.Visible    = uirdbtnYes.Checked;
                lblNoMessage.Visible  = uirdbtnNo.Checked;
                lblYesMessage.Visible = uirdbtnYes.Checked;

                uiButtonUndo.Visible = uirdbtnNo.Visible || uirdbtnYes.Visible;

                OnValidated(new EventArgs());
            }
            catch (Exception ex)
            {
                UIHelper.HandleUIException(ex);
            }
        }
Exemple #26
0
        public void BindActivityBFData(lmDatasets.atriumDB.ActivityBFDataTable dtBF)
        {
            UIHelper.ComboBoxInit(FM.AtMng.acMng.DB.ACBF, activityBFGridEX.DropDowns["ddACBFId"], FM);
            UIHelper.ComboBoxInit("vRoleucontacttype", activityBFGridEX.DropDowns["ddRoleCode"], FM);
            UIHelper.ComboBoxInit(FM.AtMng.acMng.DB.ACSeries, activityBFGridEX.DropDowns["ddAcSeries"], FM);
            UIHelper.ComboBoxInit("vOfficerList", activityBFGridEX.DropDowns["ddOfficer"], FM);
            ucBFOfficerId.FM            = FM;
            ucContactSelectBox1.FM      = FM;
            priorityJComboBox.ImageList = UIHelper.browseImgList();
            priorityJComboBox.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem(LawMate.Properties.Resources.PriorityNormal, 0, 36));
            priorityJComboBox.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem(LawMate.Properties.Resources.PriorityHigh, 1, 34));
            priorityJComboBox.Items.Add(new Janus.Windows.EditControls.UIComboBoxItem(LawMate.Properties.Resources.PriorityUrgent, 2, 35));

            editBox1.DataBindings.Add("Text", activityBFBindingSource, UIHelper.Translate(FM, "BFDescriptionEng"));

            DataView dv = new DataView(dtBF, "", "", DataViewRowState.ModifiedCurrent | DataViewRowState.Unchanged);

            activityBFBindingSource.DataSource = dv;
            activityBFBindingSource.DataMember = "";

            //activityBFBindingSource.Filter = "not (isMail=1 and BFOfficerid<>" + FM.AtMng.WorkingAsOfficer.OfficerId.ToString() + ")";

            dtBF.ColumnChanged += new DataColumnChangeEventHandler(dtBF_ColumnChanged);
            FM.GetActivityBF().OnUpdate += new atLogic.UpdateEventHandler(ucActivityBF_OnUpdate);

            if (dtBF.Rows.Count == 0)
            {
                UIHelper.EnableControls(activityBFBindingSource, false);
            }
        }
Exemple #27
0
 public void ApplyAKASecurity(DataRow dr)
 {
     if (dr != null)
     {
         UIHelper.EnableControls(aKABindingSource, FM.GetCLASMng().GetDebtor().CanEdit(CurrentRow()));
     }
 }
Exemple #28
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;
                }
            }
        }
Exemple #29
0
        public void bindOpinionData(lmDatasets.Advisory.OpinionDataTable a)
        {
            ucMultiDropDown1.SetDataBinding(FM.Codes("LawyerList"), "");
            UIHelper.ComboBoxInit("OpinionType", mccOpinionType, FM);
            ucContactSelectBox1.FM   = FM;
            ucOfficeSelectBox1.AtMng = FM.AtMng;

            this.opinionBindingSource.DataSource = a.DataSet;
            this.opinionBindingSource.DataMember = a.TableName;

            atriumBE.DocManager dm = FM.GetDocMng();
            OpenDocDialog = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog;

            //ucDoc1.OpenDocDialog = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog;
            //ucDoc1.Init(dm);
            ucDocView1.OpenDocDialog = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog;
            ucDocView1.Init(dm);

            Advisory.OpinionRow or = CurrentRow();
            LoadDocs(or);

            a.ColumnChanged += new DataColumnChangeEventHandler(a_ColumnChanged);
            FM.GetAdvisoryMng().GetOpinion().OnUpdate += new atLogic.UpdateEventHandler(ucOpinion_OnUpdate);

            ApplySecurity(CurrentRow());
        }
Exemple #30
0
        private void ProcessCashBlotter()
        {
            CLAS.CashBlotterRow drCB = (CLAS.CashBlotterRow)FM.GetCLASMng().DB.CashBlotter.Select("SecondConfirm is null")[0];
            bool   createsNewCB      = false;
            string processMessage    = "Process Cash Blotter (First Confirm)?";

            if (!drCB.IsFirstConfirmNull())
            {
                processMessage = "Process Cash Blotter (Second Confirm)?";
                createsNewCB   = true;
            }

            if (MessageBox.Show(processMessage, "Process Cash Blotter", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
            {
                ActivityConfig.ACSeriesRow acsr;
                if (createsNewCB)
                {
                    acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBSecondConfirmAcId));
                }
                else
                {
                    acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBFirstConfirmAcId));
                }

                this.FileForm().ReadOnly = true;
                fACWizard facwr = new fACWizard(FM, acsr.ACSeriesId, atriumBE.ACEngine.RevType.CashBlotter, CurrentRow().CashBlotterID, null);
                this.FileForm().HookupWizClose(facwr);
                facwr.Show();
            }
        }
Exemple #31
0
		public void Attach(FM.IceLink.Conference conference, Action<Exception> callback)
		{
			try {
				this.Conference = conference;

				conference.OnLinkOfferAnswer += (e) =>
				{
					try {
						Signal signal = new Signal();
						signal.PeerId = e.PeerId;
						signal.DataJson = e.OfferAnswer.ToJson();
						#if USE_TCP_SIGNALLING
							TCPSender<Signal> sender = new TCPSender<Signal> ();
							if (sender.Connect (IPAddress, TCP_PORT_SIGNALLING)) {
								sender.Send (TCP_MESSAGE_OFFER_ANSWER, signal);
								sender.Disconnect ();
							}
						#else
							UDPSender<Signal> sender = new UDPSender<Signal>();
							sender.Send(TCP_MESSAGE_OFFER_ANSWER,signal,this.IPAddress,TCP_PORT_SIGNALLING);
						#endif

					}
					catch (Exception ex)
					{
						Console.WriteLine(ex.Message);
					}
						
				};
				conference.OnLinkCandidate += (e) =>
				{
					try {
						Signal signal = new Signal();
						signal.PeerId = e.PeerId;
						signal.DataJson = e.Candidate.ToJson();
						#if USE_TCP_SIGNALLING
							TCPSender<Signal> sender = new TCPSender<Signal> ();
							if (sender.Connect (IPAddress, TCP_PORT_SIGNALLING)) {
								sender.Send (TCP_MESSAGE_CANDIDATE, signal);
								sender.Disconnect ();
							}
						#else
							UDPSender<Signal> sender = new UDPSender<Signal>();
							sender.Send(TCP_MESSAGE_CANDIDATE,signal,this.IPAddress,TCP_PORT_SIGNALLING);
						#endif


					}
					catch (Exception ex)
					{
						Console.WriteLine(ex.Message);
					}
						
				};					
			}
			catch (Exception ex)
			{
				callback(ex);
			}
		}
Exemple #32
0
        public void Attach(FM.IceLink.Conference conference, string sessionId, Action<string> callback)
        {
            Conference = conference;
            SessionId = sessionId;

            // IceLink includes a WebSync client extension that will
            // automatically manage session negotiation for you. If
            // you are not using WebSync, see the 'else' block for a
            // session negotiation template.
            if (UseWebSyncExtension)
            {
                // Manage the conference automatically using a WebSync
                // channel. P2P links will be created automatically to
                // peers that join the same channel.
                WebSyncClient.JoinConference(new JoinConferenceArgs("/" + SessionId, conference)
                {
                    OnFailure = (e) =>
                    {
                        callback(string.Format("Could not attach signalling to conference {0}. {1}", SessionId, e.Exception.Message));
                    },
                    OnSuccess = (e) =>
                    {
                        callback(null);
                    }
                });
            }
            else
            {
                // When the conference generates an offer/answer or candidate,
                // we want to send it to the remote peer immediately.
                Conference.OnLinkOfferAnswer += SendOfferAnswer;
                Conference.OnLinkCandidate += SendCandidate;

                // When we receive an offer/answer or candidate, we want to
                // inform the conference immediately.
                WebSyncClient.OnNotify += ReceiveOfferAnswerOrCandidate;

                // Subscribe to a WebSync channel. When another client joins the same
                // channel, create a P2P link. When a client leaves, destroy it.
                WebSyncClient.Subscribe(new SubscribeArgs("/" + SessionId)
                {
                    OnFailure = (e) =>
                    {
                        callback(string.Format("Could not attach signalling to conference {0}. {1}", SessionId, e.Exception.Message));
                    },
                    OnReceive = (e) => { },
                    OnSuccess = (e) =>
                    {
                        callback(null);
                    }
                }
                .SetOnClientSubscribe((e) =>
                {
                    // Kick off a P2P link.
                    var peerId = e.SubscribedClient.ClientId.ToString();
                    var peerState = e.SubscribedClient.BoundRecords;
                    Conference.Link(peerId, peerState);
                })
                .SetOnClientUnsubscribe((e) =>
                {
                    // Tear down a P2P link.
                    var peerId = e.UnsubscribedClient.ClientId.ToString();
                    Conference.Unlink(peerId);
                }));
            }
        }
		protected internal FMControl(string name, FM machine)
		{
			_name = name;
			_machine = machine;
		}
Exemple #34
0
 void ScanControl_ScanResultFound(object sender, FM.Barcode.ScannerResultEventArgs e)
 {
     MessageBox.Show(String.Format("The code found is : {0}", e.ScanResult.Text));
 }