aegregory
Posts: 7
|
| Posted: 05/06/2006, 8:35 AM |
|
I have a grid set up that allows the user to click on a record and edit it. Easy enough. But the project requires that users can't modify a record once it has been reviewed and accepted by management. One of the fields on the grid tells whether or not the manager has reviewed and accepted the data in the record. It's a Booelean field called 'Accepted'
I want the user to click on the record and be redirected to an update page if the 'Accepted' field = 0. If the 'Accepted' field = 1, I want them to see the record in a read-only mode. -- Basically the same form but all fields will be labels.
What is the easiet way to accomplish this? I'm an ASP novice. Is there a way to redirect a user to an edit page or a view only page based on the value in the 'Accepted' field?
Or can I show/hide a form based on the value in the 'Accepted' field?
|
 |
 |
WKempees
|
| Posted: 05/06/2006, 9:01 AM |
|
Not an ASP but a general answer, just to give directions:
Possibilities:
1. Create a copy of the form, containing only labels and a Cancel button.
In the before show of your first form act on Activated to redirect to
show only form or the edit form.
You could also do this in the grid if it carries the Accepted field.
2. Study CCS authorization model, it has a view mode in combination with
userlevel, you could give all your external users a defauls authorization
level of 1 or higher, granting rights to levels 1 and higher, level 0 you
could then give view-only rights. In beforeshow of your form check value of
Accepted and just set userlevel to zero if Accepted is zero.
3. Do nothing to your form, just hide the submit button if Acceptaned is 0.
Set visibility of submit (or its panel) to no, set it to yes only if
Accepted is true.
Supply a Cancel button to give a path back to the grid.
4 ............. there are more ways to ....................
Walter
"aegregory" <aegregory@forum.codecharge> schreef in bericht
news:6445cc224880d1@news.codecharge.com...
>I have a grid set up that allows the user to click on a record and edit
>it.
> Easy enough. But the project requires that users can't modify a record
> once it
> has been reviewed and accepted by management. One of the fields on the
> grid
> tells whether or not the manager has reviewed and accepted the data in the
> record. It's a Booelean field called 'Accepted'
>
> I want the user to click on the record and be redirected to an update page
> if
> the 'Accepted' field = 0. If the 'Accepted' field = 1, I want them to see
> the
> record in a read-only mode. -- Basically the same form but all fields will
> be
> labels.
>
> What is the easiet way to accomplish this? I'm an ASP novice. Is there a
> way to
> redirect a user to an edit page or a view only page based on the value in
> the
> 'Accepted' field?
>
> Or can I show/hide a form based on the value in the 'Accepted' field?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
maybe
|
| Posted: 05/07/2006, 3:59 PM |
|
I just disable the update button via asp as follows:
There are a few ways to check a fields value, either place a hidden input field in the grid or do a CCDLookUp – lets say you chose the hidden input the use the following::
If grid.field.Value = 1 Then
Grid.Button_Update.Visible = False
Else
Grid.Button_Update.Visible = True
End If
|
|
|
 |
|