Example #1
0
        protected void assistantGridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int   row = e.RowIndex;
            Label lbl = (Label)assistantGridView.Rows[row].FindControl("Label1");

            string userId = lbl.Text;

            bool flag = aManager.Delete(userId);

            if (flag == true)
            {
                msgLabel.Text = "Delete Successfully !";
                assistantGridView.DataSource = aManager.ShowAllAssistants();
                assistantGridView.DataBind();
            }
            else
            {
                msgLabel.Text = "Not Deleted !";
            }
        }