示例#1
0
        private void BtnDuplicate_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(TriggerName))
            {
                MailTrigger trigger    = CDO.Triggers.Where(x => x.Name.Equals(TriggerName)).FirstOrDefault();
                MailTrigger newTrigger = trigger.Clone(trigger);
                CDO.Triggers.Add(newTrigger);

                CustomDataObject.Save <AutoMailerCDO>(AutoMailerCDO.Key, CDO);
                SetupControls();
            }
        }
示例#2
0
        private void BtnDuplicate_Click(object sender, EventArgs e)
        {
            AutoMailerCDORoot cdo = AutoMailerCDO.CDO;

            if (!string.IsNullOrEmpty(TriggerName))
            {
                MailTrigger trigger    = cdo.Triggers.Where(x => x.Name.Equals(TriggerName)).FirstOrDefault();
                MailTrigger newTrigger = trigger.Clone(trigger);
                cdo.Triggers.Add(newTrigger);
                AutoMailerCDO.UpdateCDO(cdo);
                AutoMailerCDO.UploadCDO();
                SetupControls();
            }
        }