Ejemplo n.º 1
0
 private void DeleteSuspendedActivity()
 {
     if (CurrentRow() != null)
     {
         if (MessageBox.Show(LawMate.Properties.Resources.AreYouSureYouWantToDeleteThisSuspendedActivity, LawMate.Properties.Resources.DeleteSuspendedActivity, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             int      pos  = autoSaveGridEX.CurrentRow.Position;
             ACEState aces = ACEStateDictionnary[CurrentRow().ActivityId];
             ACEStateDictionnary.Remove(aces.ActivityId);
             AtMng.DeleteSuspendedAc(aces);
             autoSaveBindingSource.DataSource = null;
             AutoSaveDT.Clear();
             AutoSaveDT.AcceptChanges();
             LoadAutoSaveDT();
             autoSaveBindingSource.DataSource = AutoSaveDT;
             SetRowChangeUI(autoSaveBindingSource.Count == 0);
             if (autoSaveBindingSource.Count != 0)
             {
                 if (autoSaveBindingSource.Count == pos)
                 {
                     autoSaveGridEX.Row = pos - 1;
                 }
                 else
                 {
                     autoSaveGridEX.Row = pos;
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        private void Delete()
        {
            try
            {
                if (MessageBox.Show("Your current selection will be deleted.  Are you sure you want to proceed?", "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    int gridPos = activityCodeGridEX.CurrentRow.Position;
                    CurrentRow().Delete();
                    if (gridPos > activityCodeGridEX.RowCount)
                    {
                        activityCodeGridEX.Row = activityCodeGridEX.RowCount;
                    }
                    else
                    {
                        activityCodeGridEX.Row = gridPos;
                    }

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.acMng.GetActivityCode());

                    bp.Update();
                }
                else
                {
                    return;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
                return;
            }
        }
Ejemplo n.º 3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (OfficerPref.GetPref(OfficerPrefsBE.EnableReminders, true))
            {
                EnableReminders();
            }
            return;

            //function deferred until release 1.9 CJW

            myFMCal.GetAppointment().LoadByContactId(myOfficerId);


            atriumDB.AppointmentRow[] ars = (atriumDB.AppointmentRow[])myFMCal.DB.Appointment.Select("StartDateLocal > #" + DateTime.Today.ToString("yyyy/MM/dd") + "#", "StartDateLocal");
            foreach (atriumDB.AppointmentRow ar in ars)
            {
                if (!alreadydinged.Contains(ar.ApptId))
                {
                    double diff   = ar.StartDateLocal.Subtract(DateTime.Now).TotalMinutes;
                    int    window = AtMng.GetSetting(AppIntSetting.CalNotifyWindow);
                    if (diff <= window && diff >= -window)
                    {
                        alreadydinged.Add(ar.ApptId);
                        fNotify fn = new fNotify(this, ar.ApptId);

                        break;
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public fOfficeMandate(Form f)
            : base(f)
        {
            InitializeComponent();

            //AtMng.acMng.GetOfficeMandate().Load();

            officeMandateBindingSource.DataSource = AtMng.acMng.DB;
            officeMandateBindingSource.DataMember = AtMng.acMng.DB.OfficeMandate.TableName;

            offMng = AtMng.GetOffice();
            offMng.GetOffice().Load();

            DataView dvOffice   = new DataView(offMng.DB.Office, "IsOnLine=1", "officecode", DataViewRowState.CurrentRows);
            DataView dvACSeries = new DataView(AtMng.acMng.DB.ACSeries, "(Start=1 or initialstep=1 or initialstep=2) and obsolete=0", "stepcode", DataViewRowState.CurrentRows);

            officeCodeComboBox.SetDataBinding(dvOffice, "");
            suffixComboBox.SetDataBinding(dvACSeries, "");
            mccSeries.SetDataBinding(dvACSeries, "");
            mccRole.SetDataBinding(dvACSeries, "");

            officeMandateGridEX.DropDowns[0].SetDataBinding(dvOffice, "");
            officeMandateGridEX.DropDowns[1].SetDataBinding(dvACSeries, "");
            officeMandateGridEX.DropDowns[2].SetDataBinding(dvACSeries, "");
            officeMandateGridEX.DropDowns[3].SetDataBinding(dvACSeries, "");
            officeMandateGridEX.DropDowns[4].SetDataBinding(dvACSeries, "");
        }
Ejemplo n.º 5
0
        private bool Save()
        {
            try
            {
                if (MessageBox.Show("All edits (to all records) will be saved.  Are you sure you want to proceed?", "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    ucBFCode1.EndEdit();
                    aCBFBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.acMng.GetACBF());
                    bp.Update();


                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
                return(false);
            }
        }
Ejemplo n.º 6
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "tsReload":
                    AtMng.DB.Batch.Clear();
                    AtMng.GetBatch().LoadByOfficeCode(AtMng.OfficeLoggedOn.OfficeCode);
                    batchGridEX.Row = 0;
                    break;

                case "tsMarkAsRead":

                    CurrentRow().Status = "R";
                    Save();

                    break;

                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 7
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.º 8
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.º 9
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.º 10
0
 public fBatchReview(Form f) : base(f)
 {
     InitializeComponent();
     AtMng.GetBatch().LoadByOfficeCode(AtMng.OfficeLoggedOn.OfficeCode);
     BindBatchData(AtMng.DB.Batch);
     batchGridEX.MoveFirst();
 }
Ejemplo n.º 11
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.º 12
0
        private void Save()
        {
            try
            {
                if (MessageBox.Show("All edits (to all records) will be saved.  Are you sure you want to proceed?", "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    ddLookupGridEX.CurrentRow.EndEdit();
                    ddLookupGridEX.UpdateData();
                    ddLookupBindingSource.EndEdit();

                    if (ddGenericGridEX.CurrentRow != null)
                    {
                        ddGenericGridEX.CurrentRow.EndEdit();
                    }
                    ddGenericGridEX.UpdateData();
                    ddGenericBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();

                    bp.AddForUpdate(AtMng.GetddLookup());
                    bp.AddForUpdate(AtMng.GetddGeneric());
                    bp.Update();
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 13
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.º 14
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.º 15
0
        private void AddExtensionToFileFormatTable(string ext, docDB.FileFormatDataTable ffTable)
        {
            if (obe == null)
            {
                obe = AtMng.GetCodeTableBE("FileFormat");
                obe.Load();
            }

            CodesDB.FileFormatRow ffRow = (CodesDB.FileFormatRow)obe.Add(null);
            ffRow.AllowEdit    = false;
            ffRow.AllowPreview = false;
            ffRow.AllowSearch  = true;
            ffRow.AllowUpload  = true;
            ffRow.FileDescEng  = "Lotus Notes Import";
            ffRow.FileDescFre  = "Lotus Notes Import";
            ffRow.FileFormat   = ext;
            ffRow.IsBinary     = false;

            ffRow.EndEdit();
            atLogic.BusinessProcess bp = AtMng.GetBP();
            bp.AddForUpdate(obe);
            bp.Update();

            ffTable.ImportRow(ffRow);
        }
Ejemplo n.º 16
0
 private void AddBatchJob(DateTime RunAfterDate, string JobParams)
 {
     lmDatasets.appDB.BatchRow br = (lmDatasets.appDB.BatchRow)AtMng.GetBatch().Add(null);
     br.JobName      = "RunSQL";
     br.RunAfterDate = RunAfterDate;
     br.Parameters   = JobParams;
 }
Ejemplo n.º 17
0
 private void NewProvision()
 {
     if (CurrentRow() != null)
     {
         foreach (Janus.Windows.GridEX.GridEXRow gr in legislationGridEX.GetRows())
         {
             if ((int)gr.Cells["LegislationId"].Value == CurrentRow().LegislationId)
             {
                 legislationGridEX.Row = gr.Position;
                 break;
             }
         }
         legislationGridEX.CurrentRow.Expanded = true;
         appDB.ProvisionRow dfr = (appDB.ProvisionRow)AtMng.GetProvision().Add(CurrentRow());
         foreach (Janus.Windows.GridEX.GridEXRow gr in legislationGridEX.CurrentRow.GetChildRecords())
         {
             if ((int)gr.Cells["ProvisionId"].Value == dfr.ProvisionId)
             {
                 legislationGridEX.Row           = gr.Position;
                 legislationGridEX.CurrentColumn = legislationGridEX.RootTable.ChildTables[0].Columns["ProvisionNameEng"];
             }
         }
     }
     else
     {
         MessageBox.Show("Please select a Legislation row before choosing to create a new provision", "No Legislation Selected", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 18
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdNew":
                    lmDatasets.appDB.CityRow cr = (lmDatasets.appDB.CityRow)AtMng.GetCity().Add(CurrentRow());
                    cr.CityID = AtMng.PKIDGet("City", 10);
                    break;

                case "cmdSave":
                    Save();
                    break;

                case "cmdCancel":
                    Cancel();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 19
0
        private void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    docDB.DocumentRow dr = AtMng.GetTemplate().GetTemplateDoc(CurrentRow());

                    CurrentRow().Delete();
                    if (dr != null)
                    {
                        dr.Delete();
                    }

                    this.templateBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetTemplate());
                    bp.AddForUpdate(myDM.GetDocContent());
                    bp.AddForUpdate(myDM.GetDocument());

                    bp.Update();
                }
            }
            catch (Exception x)
            {
                throw new Exception("Transaction Rolled Back", x);
            }
        }
Ejemplo n.º 20
0
        private void Save()
        {
            if (AtMng.DB.Legislation.HasErrors || AtMng.DB.Provision.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    SaveRtfValues();
                    legislationBindingSource.EndEdit();
                    provisionBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();

                    bp.AddForUpdate(AtMng.GetLegislation());
                    bp.AddForUpdate(AtMng.GetProvision());
                    bp.Update();

                    setEditMode(false);
                    SetRTFValues(false);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Ejemplo n.º 21
0
        private void Clone()
        {
            if (CurrentRow() == null)
            {
                MessageBox.Show("No current template on binding source.");
                return;
            }

            appDB.TemplateRow trCurrent = CurrentRow();
            appDB.TemplateRow trCopy    = (appDB.TemplateRow)AtMng.GetTemplate().Add(null);
            trCopy.LetterName    = trCurrent.LetterName + "COPY";
            trCopy.LetterDescEng = "(Copy of) " + trCurrent.LetterDescEng;
            trCopy.LetterDescFre = "(Copie de) " + trCurrent.LetterDescFre;

            docDB.DocumentRow   docCurrent        = AtMng.GetTemplate().GetTemplateDoc(trCurrent);
            docDB.DocContentRow docContentCurrent = docCurrent.DocContentRow;

            docDB.DocumentRow   docCopy        = AtMng.GetTemplate().GetTemplateDoc(trCopy);
            docDB.DocContentRow docContentCopy = docCopy.DocContentRow;

            docCopy.CommMode  = docCurrent.CommMode;
            docCopy.efSubject = docCurrent.efSubject;
            docCopy.efType    = docCurrent.efType;

            docContentCopy.Contents = docContentCurrent.Contents;
            docContentCopy.Ext      = docContentCurrent.Ext;

            CurrentDocRow = docCopy;
            templateBindingSource.Position = templateBindingSource.Find("TemplateId", trCopy.TemplateId);
        }
Ejemplo n.º 22
0
        private void Save()
        {
            if (AtMng.DB.Template.HasErrors || myDM.DB.Document.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    this.templateBindingSource.EndEdit();
                    ucDoc1.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetTemplate());
                    bp.AddForUpdate(myDM.GetDocContent());
                    bp.AddForUpdate(myDM.GetDocument());

                    bp.Update();


                    EditDocContents(false);
                    templateGridEX.Focus();
                    //causes currentchanged on binding source to fire - changing order
                    //Atmng.DB.Template.AcceptChanges();

                    //myDM.DB.Document.AcceptChanges();
                    //myDM.DB.DocContent.AcceptChanges();
                }
                catch (Exception x)
                {
                    throw new Exception("Transaction Rolled Back", x);
                }
            }
        }
Ejemplo n.º 23
0
        private void Save()
        {
            if (AtMng.DB.Issue.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    string nodeKey = CurrentRow().IssueId.ToString();
                    SaveRtfValues();
                    this.issueBindingSource1.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetIssue());
                    bp.Update();

                    //LoadRoot();

                    setCurrentNode(nodeKey);
                    inEditMode           = false;
                    lblRtfEdited.Visible = false;
                    SetRTFValues(false);
                    //TreeNode[] tn=treeView1.Nodes.Find(CurrentRow().ParentIssueId.ToString(), true);
                    //TreeNode nd = treeView1.SelectedNode;
                    //nd.Remove();
                    //tn[0].Nodes.Add(nd);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Ejemplo n.º 24
0
        private void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    this.issueBindingSource1.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetIssue());
                    bp.Update();

                    lmDatasets.appDB.IssueRow ir = (lmDatasets.appDB.IssueRow)treeView1.SelectedNode.PrevNode.Tag;
                    treeView1.SelectedNode.Remove();
                    setBindingSourcePosition(ir.IssueId);
                    setCurrentNode(ir.IssueId.ToString());

                    //treeView1.Enabled = true;
                    //LoadRoot();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Ejemplo n.º 25
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdCreateView":
                    string sql = AtMng.GetddTable().CreateSQLView(CurrentRowTable());
                    Clipboard.SetText(sql);
                    MessageBox.Show("SQL statement placed on clipboard");
                    break;

                case "cmdRefreshReferences":
                    RefreshReferences();
                    break;

                case "cmdPopulate":
                    Populate();
                    break;

                case "cmdCancel":
                    Cancel();
                    break;

                case "cmdSave":
                    Save();
                    break;

                case "cmdExportToXML":
                    ExportToXml();
                    break;

                case "cmdNewTable":
                    lmDatasets.appDB.ddTableRow dtr = (lmDatasets.appDB.ddTableRow)AtMng.GetddTable().Add(null);
                    ddTableGridEX.Find(ddTableGridEX.RootTable.Columns["TableName"], Janus.Windows.GridEX.ConditionOperator.Equal, "New Table", 0, 1);
                    ddTableGridEX.CurrentColumn = ddTableGridEX.RootTable.Columns["TableName"];
                    ddTableGridEX.EditMode      = Janus.Windows.GridEX.EditMode.EditOn;
                    break;

                case "cmdNewField":
                    if (CurrentRowTable() != null)
                    {
                        lmDatasets.appDB.ddFieldRow dfr = (lmDatasets.appDB.ddFieldRow)AtMng.GetddField().Add(CurrentRowTable());
                        ddFieldGridEX.Find(ddFieldGridEX.RootTable.Columns["FieldId"], Janus.Windows.GridEX.ConditionOperator.Equal, dfr.FieldId, 0, 1);
                        //ddFieldGridEX.CurrentColumn = ddFieldGridEX.RootTable.Columns["FieldName"];
                        //ddFieldGridEX.EditMode = Janus.Windows.GridEX.EditMode.EditOn;
                    }
                    else
                    {
                        MessageBox.Show("Please select a Table row before choosing to create a new field", "No Table Selected", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 26
0
 public fCity(Form f) : base(f)
 {
     InitializeComponent();
     AtMng.GetProvince().Load();
     AtMng.GetCity().Load();
     provinceBindingSource.DataMember = "Province";
     provinceBindingSource.DataSource = AtMng.DB;
 }
Ejemplo n.º 27
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.º 28
0
        public fLogEvent(Form f)
            : base(f)
        {
            InitializeComponent();

            AtMng.GetEventLog().Load();
            eventLogBindingSource.DataSource = AtMng.DB.EventLog;
        }
Ejemplo n.º 29
0
 private void Save()
 {
     cGridEX.CurrentRow.EndEdit();
     cGridEX.UpdateData();
     atLogic.BusinessProcess bp = AtMng.GetBP();
     bp.AddForUpdate(obe);
     bp.Update();
 }
Ejemplo n.º 30
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());
        }