public int UpdateEmployeeBonus()
{
    SqlConnection conn;
    SqlCommand cmd;
    int RecordsAffected;
    string cmdString = "UPDATE Employees SET emp_bonus=1000 WHERE yrs_duty>=5";
    conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;User Instance=True");
    cmd = new SqlCommand(cmdString, conn);
    conn.Open();

    RecordsAffected = cmd.ExecuteNonQuery();
    conn.Close();

    return RecordsAffected;
}
