Exemplo n.º 1
0
 protected void btnSubmit_OnClick(object sender, EventArgs e)
 {
     RequiresAuthorization(Authorizations.UpdateGlobal);
     var sysprepTag = new SysprepTag
     {
         Id = SysprepTag.Id,
         Name = txtName.Text,
         OpeningTag = txtOpenTag.Text,
         ClosingTag = txtCloseTag.Text,
         Description = txtSysprepDesc.Text,
         Contents = txtContent.Text        
     };
   
     var result = BLL.SysprepTag.UpdateSysprepTag(sysprepTag);
     EndUserMessage = result.IsValid ? "Successfully Updated Sysprep Tag" : result.Message;
 }
Exemplo n.º 2
0
    protected void btnSubmit_OnClick(object sender, EventArgs e)
    {
        RequiresAuthorization(Authorizations.CreateGlobal);
        var sysPrepTag = new SysprepTag()
        {
            Name = txtName.Text,
            OpeningTag = txtOpenTag.Text,
            ClosingTag = txtCloseTag.Text,
            Description = txtSysprepDesc.Text,
            Contents = txtContent.Text
        };

        var result = BLL.SysprepTag.AddSysprepTag(sysPrepTag);
        if (result.IsValid)
        {
            EndUserMessage = "Successfully Created Sysprep Tag";
            Response.Redirect("~/views/global/sysprep/edit.aspx?cat=sub1&syspreptagid=" + sysPrepTag.Id);
        }
        else
        {
            EndUserMessage = result.Message;
        }
    }
Exemplo n.º 3
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);
        }