rado
Posts: 221
|
| Posted: 06/07/2009, 9:15 AM |
|
Question #1.
So, I have to make a grid that will show all information about properties and one of them is column "room status" which could be:
1. Occupied
2. Reserved
3. Available
What I want to make is to set "room status" field in grid to be link but:
1. If the status is "Occupied" :
1. I would like to change the cell color in grid to "RED" for all records
2. The click on link will redirect user to "Page1"
2. If the status is "Reserved"
1. I would like to change the cell color in grid to"YELLOW" for all records
2. the click on link will redirectuser to "Page2"
3. If the status is "Available"
1. I would like to change the cell color in grid to "GREEN" for all records
2. The click on link will redirect user to "Page3"
===========================================================================================
Additional Question # 2.
I plan to make "room reservation record" that will reserve the room for tenant for some period of time. So, I have the SQL procedure that I would like to run every time before user open ""room reservation record". This SQL procedure is actually going trough all reservation records and if find that status of room is "reserved" and reservation time is expired, it will change the status to "available.
So, again, I need to know where I can put my sql procedure and how to call it in CCS
Thanks a lot
Rado.
|
 |
 |
melvyn
Posts: 333
|
| Posted: 06/07/2009, 12:59 PM |
|
Create 3 links and hide them all. Then create a beforeshow event and show only one link depending on values. Color and other properties can be enclosed in a class <a href="{XXX}" class='ocupied' ...> or <a href="{XXX}" style="color:green"...>; because they'll hide/show only in certain conditions you don't need to go deep there.
Before show row:
if ($Container->status->GetValue() == 'Occupied'){ $Container->linkstatus->Visible=true}
....
You're qualified to code that.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
melvyn
Posts: 333
|
| Posted: 06/07/2009, 1:01 PM |
|
Quote rado:Additional Question # 2.
...
So, again, I need to know where I can put my sql procedure and how to call it in CCS
BeforeShow
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
rado
Posts: 221
|
| Posted: 06/07/2009, 6:17 PM |
|
Thanks Melvyn,
Which action? Don't tell me "Custom script". I would like to call from CCS already done script with SQL STORE procedure.
Rado
|
 |
 |
|