Ejemplo n.º 1
0
    /// <summary>
    /// Event fierd when submit button is triggered.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ProductAdmin AdminAccess = new ProductAdmin();

        DigitalAsset entity = new DigitalAsset();
        entity.DigitalAsset = txtDigitalAsset.Text.Trim();
        entity.ProductID = ItemId;
        entity.OrderLineItemID = null;

        bool Check = AdminAccess.AddDigitalAsset(entity);

        if (Check)
        {
            Response.Redirect("~/admin/secure/catalog/product/view.aspx?mode=digitalAsset&itemid=" + ItemId);
        }
        else
        {
            lblMsg.Text = "Could not add the product category. Please try again.";
            return;
        }
    }