Beispiel #1
0
 public void ClearSummaries()
 {
     for (var rt = GDMRecordType.rtIndividual; rt <= GDMRecordType.rtLocation; rt++)
     {
         IHyperView summary = fTabParts[(int)rt].Summary;
         if (summary != null)
         {
             summary.Lines.Clear();
         }
     }
 }
Beispiel #2
0
        public void NotifyRecord(GDMRecord record, RecordAction action)
        {
            if (record == null)
            {
                return;
            }

            DateTime dtNow = DateTime.Now;

            switch (action)
            {
            case RecordAction.raAdd:
            case RecordAction.raEdit:
                record.ChangeDate.ChangeDateTime = dtNow;
                CheckChangedRecord(record, true);
                break;

            case RecordAction.raDelete:
            {
                CheckChangedRecord(record, false);

                IListView rView = GetRecordsViewByType(record.RecordType);
                if (rView != null)
                {
                    rView.DeleteRecord(record);

                    IHyperView hView = GetHyperViewByType(record.RecordType);
                    if ((hView != null) && (rView.ListMan.FilteredCount == 0))
                    {
                        hView.Lines.Clear();
                    }
                }
            }
            break;

            case RecordAction.raJump:
                break;

            case RecordAction.raMoveUp:
            case RecordAction.raMoveDown:
                break;
            }

            if (action != RecordAction.raJump)
            {
                fContext.Tree.Header.TransmissionDateTime = dtNow;
                fContext.Modified = true;

                AppHost.Instance.NotifyRecord(fView, record, action);
            }
        }
Beispiel #3
0
        public void ShowRecordInfo(GDMRecord record)
        {
            if (record == null)
            {
                return;
            }

            try {
                IHyperView hyperView = GetHyperViewByType(record.RecordType);
                if (hyperView != null)
                {
                    GKUtils.GetRecordContent(fContext, record, hyperView.Lines);
                }
            } catch (Exception ex) {
                Logger.LogWrite("BaseWinSDI.ShowRecordInfo(): " + ex.Message);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Gets a hyper-view control for the specified record type.
        /// </summary>
        /// <param name="recType">Record type for which a hyper view control is
        /// required.</param>
        /// <returns>Hyper view control.</returns>
        public IHyperView GetHyperViewByType(GDMRecordType recType)
        {
            IHyperView view = fTabParts[(int)recType].Summary;

            return(view);
        }
Beispiel #5
0
 public void SetTabPart(GDMRecordType recType, IListView listView, IHyperView summary)
 {
     fTabParts[(int)recType] = new TabParts(listView, summary);
 }
Beispiel #6
0
 public TabParts(IListView listView, IHyperView summary)
 {
     ListView = listView;
     Summary  = summary;
 }