/// <summary> /// Get a collection of all of the Virtual MTA Groups. /// </summary> /// <returns></returns> public static VirtualMtaGroupCollection GetAllVirtualMtaGroups() { VirtualMtaGroupCollection ipGroups = VirtualMtaGroupDB.GetVirtualMtaGroups(); // Get all the groups Virtual MTAs. foreach (VirtualMtaGroup grp in ipGroups) { grp.VirtualMtaCollection = VirtualMtaDB.GetVirtualMtasInVirtualMtaGroup(grp.ID); } return(ipGroups); }
// // GET: /VirtualMta/ public ActionResult Index() { VirtualMTACollection ips = VirtualMtaDB.GetVirtualMtas(); List <VirtualMTASummary> summary = new List <VirtualMTASummary>(); VirtualMtaGroupCollection ipGroups = WebInterfaceLib.VirtualMtaWebManager.GetAllVirtualMtaGroups(); foreach (VirtualMTA address in ips) { summary.Add(new VirtualMTASummary { IpAddress = address, SendTransactionSummaryCollection = WebInterfaceLib.DAL.VirtualMtaTransactionDB.GetSendSummaryForIpAddress(address.ID) }); } return(View(new VirtualMtaPageModel { VirtualMTASummaryCollection = summary.ToArray(), IpGroups = ipGroups })); }