Ejemplo n.º 1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            SysprepTag       = !string.IsNullOrEmpty(Request["syspreptagid"]) ? BLL.SysprepTag.GetSysprepTag(Convert.ToInt32(Request.QueryString["syspreptagid"])) : null;
            BootTemplate     = !string.IsNullOrEmpty(Request["templateid"]) ? BLL.BootTemplate.GetBootTemplate(Convert.ToInt32(Request.QueryString["templateid"])) : null;
            BootEntry        = !string.IsNullOrEmpty(Request["entryid"]) ? BLL.BootEntry.GetBootEntry(Convert.ToInt32(Request.QueryString["entryid"])) : null;
            FileFolder       = !string.IsNullOrEmpty(Request["fileid"]) ? BLL.FileFolder.GetFileFolder(Convert.ToInt32(Request.QueryString["fileid"])) : null;
            ManifestTemplate = !string.IsNullOrEmpty(Request["manifestid"]) ? BLL.MunkiManifestTemplate.GetManifest(Convert.ToInt32(Request.QueryString["manifestid"])) : null;

            RequiresAuthorization(Authorizations.ReadGlobal);
        }
Ejemplo n.º 2
0
    public void Page_Load(object sender, EventArgs e)
    {
        globalBasePage   = (Page as Global);
        ManifestTemplate = globalBasePage.ManifestTemplate;

        if (ManifestTemplate == null)
        {
            divMunkiDetails.Visible = false;
            return;
        }
        else
        {
            divMunki.Visible = false;
        }
    }
Ejemplo n.º 3
0
    protected void btnSubmit_OnClick(object sender, EventArgs e)
    {
        RequiresAuthorization(Authorizations.CreateGlobal);
        var manifestTemplate = new MunkiManifestTemplate()
        {
            Name        = txtManifestName.Text,
            Description = txtManifestDesc.Text,
        };

        var result = BLL.MunkiManifestTemplate.AddManifest(manifestTemplate);

        if (result.IsValid)
        {
            EndUserMessage = "Successfully Created Manifest Template";
            Response.Redirect("~/views/global/munki/general.aspx?cat=sub2&manifestid=" + manifestTemplate.Id);
        }
        else
        {
            EndUserMessage = result.Message;
        }
    }