skysigma
Posts: 24
|
Posted: 10/07/2014, 11:32 AM |
|
I need to add to the URL the parameters of a grid after an updating.
I added on After Executed Update events the following code:
global $add_info_clients_offer, $Redirect;
$get1 = CCGetFromGet("Id_status_pnc");
$get2 = CCGetFromGet("id_offer");
$get3 = CCGetFromGet("id_client");
$get4 = CCGetFromGet("id_materials");
$get5 = CCGetFromGet("Value");
$get6 = CCGetFromGet("id_pnc");
$Redirect = "add_order.php"."?I_status_pnc=".$get1."&id_offer=".$get2."&id_client=".$get3."&id_materials=".$get4."&Value=".$get5."&id_pnc=.$get6";
But the result is the following:
add_order.php?Id_status_pnc=id_offer=id_client=&id_materials=&Value=&id_pnc=
There is the mistake?
Thanks
|
|
|
saseow
Posts: 744
|
Posted: 10/07/2014, 8:07 PM |
|
Try getting the values from the database instead of GetFromGet.
|
|
|
skysigma
Posts: 24
|
Posted: 10/08/2014, 12:32 PM |
|
I solved in this way
function BindEvents()
{
global $add_info_clients_offer;
$add_info_clients_offer->ds->CCSEvents["AfterExecuteUpdate"] = "add_info_clients_offer_ds_AfterExecuteUpdate";
}
function add_info_clients_offer_ds_AfterExecuteUpdate(& $sender)
{
$add_info_clients_offer_ds_AfterExecuteUpdate = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $add_info_clients_offer; //Compatibility
global $DBConnection1;
global $get2;
$Page = CCGetParentPage($sender);
$ccs_result = CCDLookUp('id_offer', 'offer', '', $Page->Connections["Connection1"]);
$ccs_result = strval($ccs_result);
$get2 = $ccs_result;
global $DBConnection1;
global $get1;
$Page = CCGetParentPage($sender);
$ccs_result = CCDLookUp('id_status_pnc', 'offer', ' ', $Page->Connections["Connection1"]);
$ccs_result = strval($ccs_result);
$get1 = $ccs_result;
global $Redirect;
$Redirect = "Home.php"."?Id_status_pnc=".$get1."&id_offer=".$get2;
|
|
|
|