//Constructor For Starting Multicast For Group public Multicast(Models.Group group,int userId) { _computers = new List<Models.Computer>(); _multicastSession = new Models.ActiveMulticastSession(); _isOnDemand = false; _group = group; _userId = userId; }
public static bool UpdateActiveMulticastSession(Models.ActiveMulticastSession activeMulticastSession) { using (var uow = new DAL.UnitOfWork()) { uow.ActiveMulticastSessionRepository.Update(activeMulticastSession, activeMulticastSession.Id); return(uow.Save()); } }
//Constructor For Starting Multicast For Group public Multicast(Models.Group group, int userId) { _computers = new List <Models.Computer>(); _multicastSession = new Models.ActiveMulticastSession(); _isOnDemand = false; _group = group; _userId = userId; }
//Constructor For Starting Multicast For On Demand public Multicast(Models.ImageProfile imageProfile, string clientCount, int userId) { _multicastSession = new Models.ActiveMulticastSession(); _isOnDemand = true; _imageProfile = imageProfile; _clientCount = clientCount; _group = new Models.Group{ImageProfileId = _imageProfile.Id}; _userId = userId; _multicastSession.ImageProfileId = imageProfile.Id; }
//Constructor For Starting Multicast For On Demand public Multicast(Models.ImageProfile imageProfile, string clientCount, int userId) { _multicastSession = new Models.ActiveMulticastSession(); _isOnDemand = true; _imageProfile = imageProfile; _clientCount = clientCount; _group = new Models.Group { ImageProfileId = _imageProfile.Id }; _userId = userId; _multicastSession.ImageProfileId = imageProfile.Id; }
public static void SendMulticastCompletedEmail(Models.ActiveMulticastSession session) { //Mail not enabled if (Settings.SmtpEnabled == "0") { return; } foreach (var user in BLL.User.SearchUsers("").Where(x => x.NotifyComplete == 1 && !string.IsNullOrEmpty(x.Email))) { if (session.UserId == user.Id) { var mail = new Helpers.Mail { MailTo = user.Email, Body = session.Name + " Multicast Task Has Completed.", Subject = "Multicast Completed" }; mail.Send(); } } }
public static bool AddActiveMulticastSession(Models.ActiveMulticastSession activeMulticastSession) { using (var uow = new DAL.UnitOfWork()) { if (uow.ActiveMulticastSessionRepository.Exists(h => h.Name == activeMulticastSession.Name)) { //Message.Text = "A Multicast Is Already Running For This Group"; return(false); } uow.ActiveMulticastSessionRepository.Insert(activeMulticastSession); if (uow.Save()) { //Message.Text = "Successfully Created Multicast"; return(true); } else { //Message.Text = "Could Not Create Multicast"; return(false); } } }