First of all, it is defined not only by your application but also by IIS settings. I think this article will help.
To answer the ADO.net part - there are several types of data concurrency control, you can read here (Data Concurrency in ADO.NET) about difference and use one that is appropriate in your case.
In your case with locks you are going to change your query from
update T set IsLock = 1 where recordID = 555
to
update T set IsLock = 1 where recordID = 555 and IsLock = 0
and check return value of cmd.ExecuteNonQuery()
to be 1 or 0.
In case it returned 0 record was not updated and lock was set by another user etc.
You might also want to add LockerID
field to your table so your query going to be
update T set IsLock = 1, LockerID = @userID where recordID = @recordID and IsLock = 0
So when opening record you would first execute your lock query and if it was successful you will load record and show edit mode, otherwise show read-only mode.