示例#1
0
    protected void btnSubmit_OnClick(object sender, EventArgs e)
    {
        RequiresAuthorization(Authorizations.CreateGlobal);
        var bootEntry = new Models.BootEntry
        {
            Name        = txtName.Text,
            Description = txtDescription.Text,
            Content     = txtContents.Text,
            Type        = ddlType.Text,
            Order       = txtOrder.Text,
            Active      = chkActive.Checked ? 1 : 0,
            Default     = chkDefault.Checked ? 1 : 0
        };


        var result = BLL.BootEntry.AddBootEntry(bootEntry);

        if (!result.IsValid)
        {
            EndUserMessage = result.Message;
        }
        else
        {
            EndUserMessage = "Successfully Added Boot Menu Entry";
            Response.Redirect("~/views/global/boottemplates/editentry.aspx?cat=sub1&entryid=" + bootEntry.Id);
        }
    }
示例#2
0
    protected void btnSubmit_OnClick(object sender, EventArgs e)
    {
        RequiresAuthorization(Authorizations.UpdateGlobal);
        var bootEntry = new Models.BootEntry
        {
            Id = BootEntry.Id,
            Name = txtName.Text,
            Description = txtDescription.Text,
            Content = txtContents.Text,
            Type = ddlType.Text,
            Order = txtOrder.Text,
            Active = chkActive.Checked ? 1 : 0,
            Default = chkDefault.Checked ? 1 : 0
        };

        var result = BLL.BootEntry.UpdateBootEntry(bootEntry);
        EndUserMessage = !result.IsValid ? result.Message : "Successfully Updated Boot Menu Entry";
    }
示例#3
0
    protected void btnSubmit_OnClick(object sender, EventArgs e)
    {
        RequiresAuthorization(Authorizations.UpdateGlobal);
        var bootEntry = new Models.BootEntry
        {
            Id          = BootEntry.Id,
            Name        = txtName.Text,
            Description = txtDescription.Text,
            Content     = txtContents.Text,
            Type        = ddlType.Text,
            Order       = txtOrder.Text,
            Active      = chkActive.Checked ? 1 : 0,
            Default     = chkDefault.Checked ? 1 : 0
        };

        var result = BLL.BootEntry.UpdateBootEntry(bootEntry);

        EndUserMessage = !result.IsValid ? result.Message : "Successfully Updated Boot Menu Entry";
    }
示例#4
0
    protected void btnSubmit_OnClick(object sender, EventArgs e)
    {
        RequiresAuthorization(Authorizations.CreateGlobal);
        var bootEntry = new Models.BootEntry
        {
            Name = txtName.Text,
            Description = txtDescription.Text,
            Content = txtContents.Text,
            Type = ddlType.Text,
            Order = txtOrder.Text,
            Active = chkActive.Checked ? 1 : 0,
            Default = chkDefault.Checked ? 1 : 0
        };

        var result = BLL.BootEntry.AddBootEntry(bootEntry);
        if (!result.IsValid)
            EndUserMessage = result.Message;
        else
        {
            EndUserMessage = "Successfully Added Boot Menu Entry";
            Response.Redirect("~/views/global/boottemplates/editentry.aspx?cat=sub1&entryid=" + bootEntry.Id);
        }
    }