public void SaveItem(MailList item) { item.Description = txtDescription.Text; if (ddlListModerators.SelectedValue == GetLocalizedString("Text.SelectModerator")) { item.ModeratorAddress = null; } else { item.ModeratorAddress = ddlListModerators.SelectedValue; } item.ReplyToMode = chkReplyToList.Checked ? ReplyTo.RepliesToList : ReplyTo.RepliesToSender; item.PostingMode = (PostingMode)Enum.Parse(typeof(PostingMode), ddlPostingMode.SelectedValue, true); item.ListToAddress = ddlListToAddress.SelectedValue; item.ListFromAddress = ddlListFromAddress.SelectedValue; item.ListReplyToAddress = ddlListReplyToAddress.SelectedValue; item.Password = txtPassword.Text; item.RequirePassword = chkPasswordEnabled.Checked; item.SubjectPrefix = txtSubjectPrefix.Text; item.EnableSubjectPrefix = chkSubjectPrefixEnabled.Checked; item.DigestMode = cbDigestMode.Checked; item.SendSubscribe = cbSendSubcsribe.Checked; item.SendUnsubscribe = cbSendUnsubscribe.Checked; item.AllowUnsubscribe = cbAllowUnsubscribe.Checked; item.DisableListcommand = !cbDisableListcommand.Checked; item.DisableSubscribecommand = !cbDisableSubscribecommand.Checked; item.MaxMessageSize = Int32.Parse(txtMaxMessageSize.Text); item.MaxRecipientsPerMessage = Int32.Parse(txtMaxRecipients.Text); item.Members = mailEditItems.Items; ctrl = null; }
protected void ctxValDomain_EvaluatingContext(object sender, DesktopValidationEventArgs e) { if (Parent != null) { ctrl = (MailEditAddress)Parent.Parent.FindControl("emailAddress"); } string moderator = ddlListModerators.SelectedValue; if (ctrl != null) { if (String.Equals(GetDomainName(moderator), GetDomainName(ctrl.Email), StringComparison.InvariantCultureIgnoreCase)) { e.ContextIsValid = true; return; } } e.ContextIsValid = false; }
protected void ctxValDomain_EvaluatingContext(object sender, DesktopValidationEventArgs e) { if (Parent != null) ctrl = (MailEditAddress)Parent.Parent.FindControl("emailAddress"); string moderator = ddlListModerators.SelectedValue; if (ctrl != null) { if (String.Equals(GetDomainName(moderator), GetDomainName(ctrl.Email), StringComparison.InvariantCultureIgnoreCase)) { e.ContextIsValid = true; return; } } e.ContextIsValid = false; }