>Hi everybody,
>
>Ok, I had an Approved (bit) field and I had a drop down (Awaiting Approval/Approved) + GridView. When I selected Awaiting Approval, I had checkboxes in my Grid, I could check multiple records, had a Save Approved person button what called SP. I also had ApprovedOn datetime field.
>
>Now, suppose I'm switching to Status field (character 1) to have multiple statuses.
>
>1. What kind of the interface would be good for the user?
>
>2. Once the Person is Approved, the status can not change (since Approving a person creates records in other tables). I guess this should be coded as an Update trigger on the table level...
>
>Thanks for ideas.
Hmm,
Aren't the interface is question for FrontEnd forum?
About trigger, no need of it IF you handle enable/disable status of the control where the user changes the status.
If you disable that control the the user can't change the status. BUT if someone uses some developer tools as SSMS or EM the sure, you should have TRIGGER for this, something like:
CREATE TRIGGER NoDeleteAprroved
OF yourtable
FOR UPDATE, DELETE
AS
BEGIN
IF EXISTS(SELECT * FROM DELETED WHERE ApprovedOn IS NOT NULL)
BEGIN
RAISERROR('There are some APPROVED records in your query!', 11, 1)
ROLLBACK TRANSACTION
END
END
that is just on top off my head and not tested at all :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.