public static DomainCollection GetDomains(int id_admin) { DbManagerCreator creator = new DbManagerCreator(); DbManager dbMan = creator.CreateDbManager(); DomainCollection result = new DomainCollection(); try { dbMan.Connect(); result = dbMan.SelectDomainsByAdmin(id_admin); } finally { dbMan.Disconnect(); } return(result); }
public static DomainCollection GetDomains(short[] MailProtocols) { DbManagerCreator creator = new DbManagerCreator(); DbManager dbMan = creator.CreateDbManager(); DomainCollection domains = null; try { dbMan.Connect(); domains = dbMan.SelectDomains(MailProtocols); } catch (WebMailDatabaseException) { throw; } finally { dbMan.Disconnect(); } return(domains); }