Beispiel #1
0
        private void tsAdd_Click(object sender, EventArgs e)
        {
            try
            {
                ToolStripMenuItem             ctx = (ToolStripMenuItem)sender;
                Control                       c   = (Control)ctx.Owner.Tag;
                lmDatasets.docDB.RecipientRow r   = (lmDatasets.docDB.RecipientRow)c.Tag;

                atriumBE.FileManager myFm = dm.AtMng.GetFile(currentMsg.FileId);
                myFm.GetDocMng().GetRecipient().AddRecipToFile(r, true, "FNA");
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Beispiel #2
0
        private void tsAddToAddressBook_Click(object sender, EventArgs e)
        {
            try
            {
                ToolStripMenuItem             ctx = (ToolStripMenuItem)sender;
                Control                       c   = (Control)ctx.Owner.Tag;
                lmDatasets.docDB.RecipientRow r   = (lmDatasets.docDB.RecipientRow)c.Tag;

                //get users addressbook file
                atriumBE.FileManager myFm = dm.AtMng.GetFile(dm.AtMng.WorkingAsOfficer.MyFileId);
                myFm.GetDocMng().GetRecipient().AddRecipToFile(r, true, "FAB");
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Beispiel #3
0
        private void ctxMenuRecip_Opening(object sender, CancelEventArgs e)
        {
            try
            {
                ContextMenuStrip ctx            = (ContextMenuStrip)sender;
                Control          c              = (Control)ctx.Tag;
                lmDatasets.docDB.RecipientRow r = (lmDatasets.docDB.RecipientRow)c.Tag;

                if (!r.IsListIdNull())
                {
                    e.Cancel = true;
                }
                else
                {
                    tsAdd.Enabled = true;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }