1
我在aspx页面上有一个gridview。我按单位过滤,例如:单元1,单元2等。默认情况下,当页面打开我得到的总记录数在我的数据库:如何从总记录数中获取记录的单位数
protected void sdsTACStudents_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
if (txtSearchByName.Text == "")
{
int rowCount = e.AffectedRows;
txtRecordCount.Text = rowCount.ToString();
}
}
But if ddlSearchBy.Text == "Last Name, "First Name" or "ssn", I need to display the current units count:
protected void sdsTACStudents_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
if (txtSearchByName.Text == "")
{
int rowCount = e.AffectedRows;
txtRecordCount.Text = rowCount.ToString();
}
else if ((ddlSearchBy.Text == "Last Name") || (ddlSearchBy.Text == "First Name") || (ddlSearchBy.Text == "SSN"))
{
display the current unit count which is less than the total count of all units.
}
}
我需要使用存储过程得到的人在单位是多少?