ALTER PROCEDURE dbo.GetRowsCount
AS
SET NOCOUNT ON;
SELECT * FROM users
RETURN
public int getRowsCount()
{
con.Open();
SqlCommand cmd = new SqlCommand("GetRowsCount", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
con.Close();
return dt.Rows.Count;
}
public int RowCount()
{
return usr.getRowsCount();
}
protected void btn_Click(object sender, EventArgs e)
{
bc.GetID = bc.RowCount() + 1;
}