Well, this goes beyond concurrency. StrataFrame has teh ability to handle concurrency so if two users modify the same data, it will raise the ConcurrencyException event (and even manage it for you if you by default). However, if you do not want to use concurrency and just have a "hard" lock on the record when editing, you will have to add another field to the table and update that field when the end-user edits the BO.
You would have to handle the EditingStateChanged event in the BO to determine when you are editing. Within this event if you are editing you would want to update that single field back on the database. You will need to do this outside of the BO otherwise the state will change back. Wheh I say outside of the BO, I just mean you will need to use a connection and command object manually. HOwever, you will already have the connection string the in DataSources collection which can be used within the connection object.
'-- Establish Locals
Dim loCommand As New SQLCommand()
Dim loConn As New SQLConnection(MicroFour.StrataFrame.Data.Databasics.DataSources(0).ConnectionString)
loCommand.CommandText = "UPDATE MyTable SET MyField = MyValue WHERE MyPrimaryKey = MyPKValue"
'-- Open the connection
loConn.Open()
'-- Set the connection on the command
loCommand.Connection = loConn
'-- Execute the query
loCommand.ExecuteNonQuery()
'-- Close the connection
loConn.Close()
When the state goes back to Idle, you will then just reset the flag back to a "allow edit" state. I will caution you against this type of functionality as it goes against the purpose of concurrency and can potentially leave records "locked" if there is some type of error. I recommend using the built in concurrency rather than this methodology.