Esempio n. 1
0
    protected void btnAddCat_OnClick(object sender, EventArgs e)
    {
        string hh = "";

        if (!string.IsNullOrWhiteSpace(TextBox1.Text))
        {
            hh = DBL.addNewCategory(TextBox1.Text);
        }
        if (hh == "table exists")
        {
            Label1.Visible   = true;
            Label1.ForeColor = Color.Red;
            Label1.Text      = "This category already Exists in DB ";
        }
        if (hh == "column exists in category")
        {
            Label1.Visible   = true;
            Label1.ForeColor = Color.Red;
            Label1.Text      = "This category already Exists in cat Table Delete It first";
        }
        if (hh == "Successful")
        {
            Label1.Visible   = true;
            Label1.ForeColor = Color.Green;
            Label1.Text      = "Successfully added";
        }
    }