protected void FormView1_ItemDeleting(object sender, FormViewDeleteEventArgs e)
    {
        Label id = (Label)FormView1.FindControl("lbl_id");

        bs.id = int.Parse(id.Text);
        int p = bs.bs_delete(bs);

        if (p > 0)
        {
            Response.Write("Success..");

            bind();
        }
        else
        {
            Response.Write("Failed...");
        }
    }
Exemple #2
0
    protected void DetailsView1_ItemDeleting(object sender, DetailsViewDeleteEventArgs e)
    {
        Label id = (Label)DetailsView1.Rows[0].FindControl("lbl_id");

        bs.id = int.Parse(id.Text);

        int p = bs.bs_delete(bs);

        if (p > 0)
        {
            DetailsView1.ChangeMode(DetailsViewMode.ReadOnly);
            bind();
            Response.Write("Success..");
        }
        else
        {
            Response.Write("Failed");
        }
    }
Exemple #3
0
    protected void ListView1_ItemDeleting(object sender, ListViewDeleteEventArgs e)
    {
        Label id = (Label)ListView1.Items[e.ItemIndex].FindControl("lbl_id");

        bs.id = int.Parse(id.Text);

        int p = bs.bs_delete(bs);

        if (p > 0)
        {
            Response.Write("Success..");
            ListView1.EditIndex = -1;
            display();
        }
        else
        {
            Response.Write("Failed...");
        }
    }
Exemple #4
0
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        Label id = (Label)GridView1.Rows[e.RowIndex].FindControl("lbl_id");
        int   i  = int.Parse(id.Text);

        bs.id = i;
        int p = bs.bs_delete(bs);

        if (p > 0)
        {
            Response.Write("Successfully");

            bind();
        }
        else
        {
            Response.Write("Try Again");
        }
    }