با تشکر از دوستان
حل شد
private void FirstForm_Load(object sender, EventArgs e)
{
int temp;
//
SqlConnection con1 = new SqlConnection("Data Source=.;Initial Catalog=db_document;Integrated Security=True");
con1.Open();
SqlCommand cmd2 = new SqlCommand("Select Max(PSID) as PSID from Person", con1);
cmd2.CommandType = CommandType.Text;
SqlDataReader r = cmd2.ExecuteReader();
r.Read();
if (r["PSID"].ToString() != "")
{
temp = Int32.Parse(r["PSID"].ToString()) + 1;
}
else
{
temp = 1;
}
PSID.Text = temp.ToString();
r.Close();
con1.Close();