public hMailServer.Alias AddAlias(hMailServer.Domain domain, string sName, string sValue) { hMailServer.Alias oAlias = domain.Aliases.Add(); oAlias.Name = sName; oAlias.Value = sValue; oAlias.Active = true; oAlias.Save(); return(oAlias); }
public bool SaveData() { bool newObject = false; if (representedObject == null) { hMailServer.Domain domain = APICreator.GetDomain(_domainID); hMailServer.Aliases aliases = domain.Aliases; representedObject = aliases.Add(); newObject = true; Marshal.ReleaseComObject(domain); Marshal.ReleaseComObject(aliases); } representedObject.Name = textName.Text; representedObject.Value = textValue.Text; representedObject.Active = checkEnabled.Checked; representedObject.Save(); // Refresh the node in the tree if the name has changed. IMainForm mainForm = Instances.MainForm; mainForm.RefreshCurrentNode(representedObject.Name); // Set the object to clean. DirtyChecker.SetClean(this); if (newObject) { SearchNodeText crit = new SearchNodeText(representedObject.Name); mainForm.SelectNode(crit); } return(true); }
public void Save() { _object.Save(); }