Beispiel #1
0
        private void btnAccept_Click(object sender, EventArgs e)
        {
            try {
                fCommunication.CommName          = txtName.Text;
                fCommunication.CommunicationType = (GKCommunicationType)cmbCorrType.SelectedIndex;
                fCommunication.Date.Assign(GEDCOMDate.CreateByFormattedStr(txtDate.Text, true));
                fCommunication.SetCorresponder((GKCommunicationDir)txtDir.SelectedIndex, fTempInd);

                CommitChanges();

                fBase.NotifyRecord(fCommunication, RecordAction.raEdit);

                DialogResult = DialogResult.Ok;
            } catch (Exception ex) {
                Logger.LogWrite("CommunicationEditDlg.btnAccept_Click(): " + ex.Message);
                DialogResult = DialogResult.None;
            }
        }
Beispiel #2
0
        public override bool Accept()
        {
            try {
                fCommunication.CommName          = fView.Name.Text;
                fCommunication.CommunicationType = (GKCommunicationType)fView.CorrType.SelectedIndex;
                fCommunication.Date.Assign(GEDCOMDate.CreateByFormattedStr(fView.Date.Text, true));
                fCommunication.SetCorresponder((GKCommunicationDir)fView.Dir.SelectedIndex, fTempInd);

                fBase.NotifyRecord(fCommunication, RecordAction.raEdit);

                CommitChanges();

                return(true);
            } catch (Exception ex) {
                Logger.LogWrite("CommunicationEditDlgController.Accept(): " + ex.Message);
                return(false);
            }
        }