private void cntxtmsDelete_Click(object sender, EventArgs e) { string studentNumber = dgvQuery.CurrentRow.Cells["学生信息编号"].Value.ToString(); bllStudentInfo.DeleteStudentInfo(studentNumber); dgvQuery.DataSource = bllStudentInfo.GetAllStudentInfo(null, null); }
protected void btndelete_Click(object sender, EventArgs e) { LinkButton obj = (LinkButton)(sender); string val = obj.CommandArgument.ToString(); BLLStudentInfo objbll = new BLLStudentInfo(); objbll.Rollno = val; int a = objbll.DeleteStudentInfo(objbll); SelectStudentlnfo(); }