Exemple #1
0
        private void eFileGridEX_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right) //display context menu
            {
                try
                {
                    //TODO:create context menu control
                    //raise event
                    if (CurrentRow() != null && eFileGridEX.HitTest() == Janus.Windows.GridEX.GridArea.Cell)
                    {
                        Application.UseWaitCursor = true;
                        atriumBE.FileManager fm = Atmng.GetFile(CurrentRow().FileId);
                        FileTreeView.BuildMenu(fm, ucFileContextMenu1.uiCommandManager1.Commands["cmdFNew"], FileTreeView.dmFILENEW);
                        FileTreeView.BuidAKA(fm, ucFileContextMenu1.uiCommandManager1.Commands["cmdFileAKA"]);

                        ucFileContextMenu1.uiContextMenu7.CommandManager.Tag = CurrentRow();
                        ucFileContextMenu1.uiContextMenu7.Show();
                        Application.UseWaitCursor = false;
                    }
                }
                catch (Exception x)
                {
                    Application.UseWaitCursor = false;
                    UIHelper.HandleUIException(x);
                }
            }
        }
Exemple #2
0
        private void eFileGridEX_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right) //display context menu
            {
                try
                {
                    if (AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.Atrium) == atSecurity.SecurityManager.ExPermissions.No)
                    {
                        return;
                    }

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

                        ucFileContextMenu1.uiContextMenu4.CommandManager.Tag = CurrentRow();
                        ucFileContextMenu1.uiContextMenu4.Show();
                    }
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
Exemple #3
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 #4
0
 private void CreateAddNewAppointMenu()
 {
     // NOTE: do NOT use CurrentRow() property in this method
     if (FM.IsVirtualFM)
     {
         FileTreeView.BuildMenu(FM.AtMng.GetFile(FM.AtMng.WorkingAsOfficer.MyFileId), cmdHearing, FileTreeView.dmApptNew);
     }
     else
     {
         FileTreeView.BuildMenu(FM, cmdHearing, FileTreeView.dmApptNew);
     }
 }
Exemple #5
0
        private void schedule1_SelectedAppointmentsChanged(object sender, EventArgs e)
        {
            try
            {
                if (schedule1.CurrentAppointment != null)
                {
                    int id = (int)schedule1.CurrentAppointment.GetValue("ApptId");

                    AppointmentBindingSource.Position = AppointmentBindingSource.Find("ApptId", id);
                    //   FileTreeView.BuildMenu(FM.AtMng.GetFile(CurrentRow().FileId), cmdHearing, FileTreeView.dmAppt);
                    if (ApptIsHearing())
                    {
                        FileTreeView.BuildMenu(FM.AtMng.GetFile(CurrentRow().FileId), cmdHearing, FileTreeView.dmHearing);
                    }
                    else
                    {
                        if (CurrentRow() != null)
                        {
                            FileTreeView.BuildMenu(FM.AtMng.GetFile(CurrentRow().FileId), cmdHearing, FileTreeView.dmAppt);
                        }
                        else
                        {
                            CreateAddNewAppointMenu();
                        }
                    }
                    ToggleApptPnlContents(false);
                }
                else
                {
                    if (CurrentRow() != null)
                    {
                        FileTreeView.BuildMenu(FM.AtMng.GetFile(CurrentRow().FileId), cmdHearing, FileTreeView.dmApptNew);
                    }
                    else
                    {
                        CreateAddNewAppointMenu();
                    }
                    ToggleApptPnlContents(true);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #6
0
        private void AppointmentBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            try
            {
                if (CurrentRow() == null)
                {
                    return;
                }

                if (CurrentRow().IsNull("ApptId"))
                {
                    return;
                }

                if (!CurrentRow().IsStartDateLocalNull())
                {
                    schedule1.EnsureVisible(CurrentRow().StartDateLocal);
                }

                if (ApptIsHearing())
                {
                    FileTreeView.BuildMenu(FM.AtMng.GetFile(CurrentRow().FileId), cmdHearing, FileTreeView.dmHearing);
                }
                else
                {
                    if (CurrentRow() != null)
                    {
                        FileTreeView.BuildMenu(FM.AtMng.GetFile(CurrentRow().FileId), cmdHearing, FileTreeView.dmAppt);
                    }
                    else
                    {
                        CreateAddNewAppointMenu();
                    }
                }

                DataView dv = new DataView(FM.DB.Attendee, "ApptId = " + CurrentRow().ApptId + "", "", DataViewRowState.ModifiedCurrent | DataViewRowState.Unchanged);
                attendeeBindingSource.DataSource = dv;

                ApplySecurity(CurrentRow());
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #7
0
        public void LoadACS(string form)
        {
            int acsid = System.Convert.ToInt32(form.Replace("acs-", ""));

            Atmng      = FM.AtMng;
            myACSeries = Atmng.acMng.DB.ACSeries.FindByACSeriesId(acsid);

            appDB.ddTableRow[] dtrs = (appDB.ddTableRow[])Atmng.DB.ddTable.Select("DefaultFormID=" + acsid.ToString());

            myPrimaryTable     = dtrs[0];
            secReadOnly        = Atmng.SecurityManager.CanUpdate(FM.CurrentFileId, MyFeatureID()) == atSecurity.SecurityManager.LevelPermissions.No;
            tsScreenTitle.Text = myACSeries["Desc" + Atmng.AppMan.Language].ToString();


            Init(myACSeries);

            FileTreeView.BuildMenu(FM, tsActions, myACSeries.StepCode);
        }
Exemple #8
0
        public void bindSRPData(atriumDB.SRPDataTable a)
        {
            label2.Visible = false;
            myOfficeMan    = FM.AtMng.GetOffice(FM.CurrentFile.LeadOfficeId);
            officeIDucOfficeSelectBox.AtMng = FM.AtMng;

            sRPBindingSource.DataSource = a.DataSet;
            sRPBindingSource.DataMember = a.TableName;

            a.ColumnChanged += new DataColumnChangeEventHandler(a_ColumnChanged);
            FM.GetSRP().OnUpdate += new atLogic.UpdateEventHandler(ucSRP_OnUpdate);

            //ApplySecurity(CurrentRow());

            if (!myOfficeMan.CurrentOffice.UploadsDisb)
            {
                tsImport.Enabled = Janus.Windows.UI.InheritableBoolean.False;
            }

            if (!myOfficeMan.CurrentOffice.UsesBilling)
            {
                tsSubmitSRP.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                tsGenSRP.Enabled    = Janus.Windows.UI.InheritableBoolean.False;
            }

            if (FM.AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.SysAdmin) == atSecurity.SecurityManager.ExPermissions.Yes)
            {
                cmdRollbackSRP.Visible = Janus.Windows.UI.InheritableBoolean.True;
            }
            else
            {
                cmdRollbackSRP.Visible = Janus.Windows.UI.InheritableBoolean.False;
            }

            if (a.Count == 0) // no SRPs
            {
                NoData();
            }

            FileTreeView.BuildMenu(FM, tsActions, "SRP");
        }