public override bool ApplyChanges() { EnsureChildControls(); SPSMailToList webpart = WebPartToEdit as SPSMailToList; if (webpart != null) { webpart.Login = txtLogin.Text; if (!string.IsNullOrEmpty(txtPassword.Text)) { webpart.Password = txtPassword.Text; } webpart.MailServer = txtMailServer.Text; webpart.MailPort = txtMailPort.Text; webpart.ListGuid = ddlLists.SelectedValue; webpart.UseSsl = chkUseSSL.Checked; webpart.ManualConnection = chkManual.Checked; webpart.ClearControlState(); webpart.ClearCache(); return(true); } return(false); }
public override void SyncChanges() { EnsureChildControls(); SPSMailToList webpart = WebPartToEdit as SPSMailToList; if (webpart != null) { Debug.WriteLine("*ListGuid:" + ddlLists.SelectedValue); if (!string.IsNullOrEmpty(webpart.ListGuid)) { txtLogin.Text = webpart.Login; txtPassword.Attributes.Add("value", webpart.Password); txtMailServer.Text = webpart.MailServer; txtMailPort.Text = webpart.MailPort; ddlLists.SelectedValue = webpart.ListGuid; chkUseSSL.Checked = webpart.UseSsl; chkManual.Checked = webpart.ManualConnection; } } }