コード例 #1
0
    protected void AddSkill_Click(object sender, EventArgs e)
    {
        if (SkillBox.Text == "")
        {
            SkillBox.BackColor = Color.Red;
        }

        UserBO obj = new UserBO();

        obj.skillName = SkillBox.Text;

        clsBLL obj1 = new clsBLL();
        int    result;
        int    result1 = obj1.SkillVerifyBLL(obj);

        if (result1 == 0)
        {
            result = obj1.InsertSkillBLL(obj);
            if (result == 1)
            {
                StatusBar.Text = "Skill Added Successfully!!!";
                Response.Write("<script>alert('Skill Added Successfully!!!');</script>");
                Server.Transfer("AdminSkill.aspx");
            }
            else
            {
                StatusBar.Text = "Skill not-Added!!!";
            }
        }
        else
        {
            StatusBar.Text = "Skill You Entered Al-Ready Exists";
        }
    }