protected void OkButton_Click(object sender, EventArgs e) { Unicast unicast = new Unicast(); int hostID = Convert.ToInt32((string)(Session["hostID"])); Session.Remove("hostID"); string direction = (string)(Session["direction"]); Session.Remove("direction"); if (direction == "push") { Image image = new Image(); unicast = unicast.Read(hostID, unicast); string imageID = image.GetImageID(unicast.ImageName); Session["imageID"] = imageID; if (image.Check_Checksum(imageID)) { unicast.CreateUnicast(direction, hostID); } 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); } } else { unicast.CreateUnicast(direction, hostID); } Master.Msgbox(Utility.Message); }
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 OkButton_Click(object sender, EventArgs e) { string direction = (string)(Session["direction"]); Session.Remove("direction"); if (direction == "delete") { List <int> delList = new List <int>(); delList.Add(Convert.ToInt32(host.ID)); host.Delete(delList); if (Utility.Message.Contains("Successfully")) { Response.Redirect("~/views/hosts/search.aspx"); } else { Master.Msgbox(Utility.Message); } } else if (direction == "push") { Unicast unicast = new Unicast(); Image image = new Image(); unicast = unicast.Read(Convert.ToInt32(host.ID), unicast); string imageID = image.GetImageID(unicast.ImageName); Session["imageID"] = imageID; if (image.Check_Checksum(imageID)) { unicast.CreateUnicast(direction, Convert.ToInt32(host.ID)); 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); } } else { Unicast unicast = new Unicast(); unicast.CreateUnicast(direction, Convert.ToInt32(host.ID)); Master.Msgbox(Utility.Message); } }
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); } }
protected void OkButton_Click(object sender, EventArgs e) { Unicast unicast = new Unicast(); int hostID = Convert.ToInt32((string)(Session["hostID"])); Session.Remove("hostID"); string direction = (string)(Session["direction"]); Session.Remove("direction"); if(direction == "push") { Image image = new Image(); unicast = unicast.Read(hostID,unicast); string imageID = image.GetImageID(unicast.ImageName); Session["imageID"] = imageID; if (image.Check_Checksum(imageID)) unicast.CreateUnicast(direction, hostID); 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); } } else unicast.CreateUnicast(direction, hostID); Master.Msgbox(Utility.Message); }
protected void OkButton_Click(object sender, EventArgs e) { string direction = (string)(Session["direction"]); Session.Remove("direction"); if (direction == "delete") { List<int> delList = new List<int>(); delList.Add(Convert.ToInt32(host.ID)); host.Delete(delList); if (Utility.Message.Contains("Successfully")) Response.Redirect("~/views/hosts/search.aspx"); else Master.Msgbox(Utility.Message); } else if (direction == "push") { Unicast unicast = new Unicast(); Image image = new Image(); unicast = unicast.Read(Convert.ToInt32(host.ID), unicast); string imageID = image.GetImageID(unicast.ImageName); Session["imageID"] = imageID; if (image.Check_Checksum(imageID)) { unicast.CreateUnicast(direction, Convert.ToInt32(host.ID)); 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); } } else { Unicast unicast = new Unicast(); unicast.CreateUnicast(direction, Convert.ToInt32(host.ID)); Master.Msgbox(Utility.Message); } }