protected void btnConfirm_Click(object sender, EventArgs e) { if ((string)Session["direction"] == "delete") { Session.Remove("direction"); List <int> delList = new List <int>(); delList.Add(Convert.ToInt32(group.ID)); group.Delete(delList); if (Utility.Message.Contains("Successfully")) { Response.Redirect("~/views/groups/search.aspx"); } else { Master.Msgbox(Utility.Message); } } else { Image imageInfo = new Image(); imageInfo.ID = imageInfo.GetImageID(group.Image); Session["imageID"] = imageInfo.ID; if (imageInfo.Check_Checksum(imageInfo.ID)) { int isUnicast = Convert.ToInt32(Session["isGroupUnicast"]); if (isUnicast == 1) { Unicast unicast = new Unicast(); List <int> listHostID = new List <int>(); listHostID = unicast.UnicastFromGroup(Convert.ToInt32(group.ID)); for (int z = 0; z < listHostID.Count; z++) { unicast.CreateUnicast("push", listHostID[z]); } Utility.Message = "Started " + listHostID.Count + " Tasks"; History history = new History(); history.Event = "Unicast"; history.Type = "Group"; history.TypeID = group.ID; history.CreateEvent(history); } else { Multicast multicast = new Multicast(); multicast.CreateMulticast(Convert.ToInt32(group.ID)); } Session.Remove("isGroupUnicast"); Master.Msgbox(Utility.Message); } else { lblIncorrectChecksum.Text = "This Image Has Not Been Confirmed And Cannot Be Deployed. <br>Confirm It Now?"; ClientScript.RegisterStartupScript(this.GetType(), "modalscript", "$(function() { var menuTop = document.getElementById('incorrectChecksum'),body = document.body;classie.toggle(menuTop, 'confirm-box-outer-open'); });", true); } } }
protected void btnConfirm_Click(object sender, EventArgs e) { if ((string)Session["direction"] == "delete") { Session.Remove("direction"); List<int> delList = new List<int>(); delList.Add(Convert.ToInt32(group.ID)); group.Delete(delList); if (Utility.Message.Contains("Successfully")) Response.Redirect("~/views/groups/search.aspx"); else Master.Msgbox(Utility.Message); } else { Image imageInfo = new Image(); imageInfo.ID = imageInfo.GetImageID(group.Image); Session["imageID"] = imageInfo.ID; if (imageInfo.Check_Checksum(imageInfo.ID)) { int isUnicast = Convert.ToInt32(Session["isGroupUnicast"]); if (isUnicast == 1) { Unicast unicast = new Unicast(); List<int> listHostID = new List<int>(); listHostID = unicast.UnicastFromGroup(Convert.ToInt32(group.ID)); for (int z = 0; z < listHostID.Count; z++) unicast.CreateUnicast("push", listHostID[z]); Utility.Message = "Started " + listHostID.Count + " Tasks"; History history = new History(); history.Event = "Unicast"; history.Type = "Group"; history.TypeID = group.ID; history.CreateEvent(history); } else { Multicast multicast = new Multicast(); multicast.CreateMulticast(Convert.ToInt32(group.ID)); } Session.Remove("isGroupUnicast"); Master.Msgbox(Utility.Message); } else { lblIncorrectChecksum.Text = "This Image Has Not Been Confirmed And Cannot Be Deployed. <br>Confirm It Now?"; ClientScript.RegisterStartupScript(this.GetType(), "modalscript", "$(function() { var menuTop = document.getElementById('incorrectChecksum'),body = document.body;classie.toggle(menuTop, 'confirm-box-outer-open'); });", true); } } }
protected void btnConfirm_Click(object sender, EventArgs e) { int groupID = Convert.ToInt32((string)(Session["groupID"])); int isUnicast = Convert.ToInt32(Session["isGroupUnicast"]); Group groupInfo = new Group(); groupInfo.ID = groupID.ToString(); groupInfo.Read(groupInfo); Image imageInfo = new Image(); imageInfo.ID = imageInfo.GetImageID(groupInfo.Image); Session["imageID"] = imageInfo.ID; if (imageInfo.Check_Checksum(imageInfo.ID)) { if (isUnicast == 1) { Unicast unicast = new Unicast(); List <int> listHostID = new List <int>(); listHostID = unicast.UnicastFromGroup(groupID); for (int z = 0; z < listHostID.Count; z++) { unicast.CreateUnicast("push", listHostID[z]); } Utility.Message = "Started " + listHostID.Count + " Tasks"; } else { Multicast multicast = new Multicast(); multicast.CreateMulticast(groupID); } Session.Remove("groupID"); Session.Remove("isGroupUnicast"); Master.Msgbox(Utility.Message); } else { lblIncorrectChecksum.Text = "This Image Has Not Been Confirmed And Cannot Be Deployed. <br>Confirm It Now?"; ClientScript.RegisterStartupScript(this.GetType(), "modalscript", "$(function() { var menuTop = document.getElementById('incorrectChecksum'),body = document.body;classie.toggle(menuTop, 'confirm-box-outer-open'); });", true); } }
protected void btnConfirm_Click(object sender, EventArgs e) { int groupID = Convert.ToInt32((string)(Session["groupID"])); int isUnicast = Convert.ToInt32(Session["isGroupUnicast"]); Group groupInfo = new Group(); groupInfo.ID = groupID.ToString(); groupInfo.Read(groupInfo); Image imageInfo = new Image(); imageInfo.ID = imageInfo.GetImageID(groupInfo.Image); Session["imageID"] = imageInfo.ID; if (imageInfo.Check_Checksum(imageInfo.ID)) { if (isUnicast == 1) { Unicast unicast = new Unicast(); List<int> listHostID = new List<int>(); listHostID = unicast.UnicastFromGroup(groupID); for (int z = 0; z < listHostID.Count; z++) unicast.CreateUnicast("push", listHostID[z]); Utility.Message = "Started " + listHostID.Count + " Tasks"; } else { Multicast multicast = new Multicast(); multicast.CreateMulticast(groupID); } Session.Remove("groupID"); Session.Remove("isGroupUnicast"); Master.Msgbox(Utility.Message); } else { lblIncorrectChecksum.Text = "This Image Has Not Been Confirmed And Cannot Be Deployed. <br>Confirm It Now?"; ClientScript.RegisterStartupScript(this.GetType(), "modalscript", "$(function() { var menuTop = document.getElementById('incorrectChecksum'),body = document.body;classie.toggle(menuTop, 'confirm-box-outer-open'); });", true); } }