示例#1
0
    protected void SkillSetAddButton1_Click(object sender, EventArgs e)
    {
        try
        {
            bool confirmation = false;
            PRMS controller   = new PRMS();

            confirmation = controller.AddSkillSet(Skillset.Text);

            if (confirmation)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Skillset was added successfully.')", true);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Skillset was not added.')", true);
            }
        }
        catch (Exception)
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(‘Error occurred with adding a skillset. Please contact customer support for assistance if this issue persists.’)", true);
            throw;
        }
    }