forked from edwardjrp/license_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
products_suite_list_events.php
executable file
·147 lines (124 loc) · 5.15 KB
/
products_suite_list_events.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
// //Events @1-F81417CB
//products_suite_list_v_alm_product_suites_alm_customers_TotalRecords_BeforeShow @28-78E472C7
function products_suite_list_v_alm_product_suites_alm_customers_TotalRecords_BeforeShow(& $sender)
{
$products_suite_list_v_alm_product_suites_alm_customers_TotalRecords_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_list; //Compatibility
//End products_suite_list_v_alm_product_suites_alm_customers_TotalRecords_BeforeShow
//Retrieve number of records @29-ABE656B4
$Component->SetValue($Container->DataSource->RecordsCount);
//End Retrieve number of records
//Close products_suite_list_v_alm_product_suites_alm_customers_TotalRecords_BeforeShow @28-F4383278
return $products_suite_list_v_alm_product_suites_alm_customers_TotalRecords_BeforeShow;
}
//End Close products_suite_list_v_alm_product_suites_alm_customers_TotalRecords_BeforeShow
//products_suite_list_v_alm_product_suites_params_BeforeShow @40-BCA266D3
function products_suite_list_v_alm_product_suites_params_BeforeShow(& $sender)
{
$products_suite_list_v_alm_product_suites_params_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_list; //Compatibility
//End products_suite_list_v_alm_product_suites_params_BeforeShow
//Custom Code @41-2A29BDB7
// -------------------------
// Write your own code here.
$querystring = trim(CCGetQueryString("QueryString",""));
if (strlen($querystring) > 0)
$sender->SetValue("&$querystring");
// -------------------------
//End Custom Code
//Close products_suite_list_v_alm_product_suites_params_BeforeShow @40-4330C494
return $products_suite_list_v_alm_product_suites_params_BeforeShow;
}
//End Close products_suite_list_v_alm_product_suites_params_BeforeShow
//products_suite_list_v_alm_product_suites_pndeletebutton_BeforeShow @45-43E7BE90
function products_suite_list_v_alm_product_suites_pndeletebutton_BeforeShow(& $sender)
{
$products_suite_list_v_alm_product_suites_pndeletebutton_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_list; //Compatibility
//End products_suite_list_v_alm_product_suites_pndeletebutton_BeforeShow
//Custom Code @46-2A29BDB7
// -------------------------
// Write your own code here.
switch (CCGetGroupID()) {
case 3:
case 4:
$products_suite_list->v_alm_product_suites->pndeletebutton->Visible = true;
break;
default:
$products_suite_list->v_alm_product_suites->pndeletebutton->Visible = false;
break;
}
// -------------------------
//End Custom Code
//Close products_suite_list_v_alm_product_suites_pndeletebutton_BeforeShow @45-BCA49E6F
return $products_suite_list_v_alm_product_suites_pndeletebutton_BeforeShow;
}
//End Close products_suite_list_v_alm_product_suites_pndeletebutton_BeforeShow
//products_suite_list_v_alm_product_suites_BeforeShowRow @11-5F9A9C40
function products_suite_list_v_alm_product_suites_BeforeShowRow(& $sender)
{
$products_suite_list_v_alm_product_suites_BeforeShowRow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_list; //Compatibility
//End products_suite_list_v_alm_product_suites_BeforeShowRow
//Set Row Style @19-982C9472
$styles = array("Row", "AltRow");
if (count($styles)) {
$Style = $styles[($Component->RowNumber - 1) % count($styles)];
if (strlen($Style) && !strpos($Style, "="))
$Style = (strpos($Style, ":") ? 'style="' : 'class="'). $Style . '"';
$Component->Attributes->SetValue("rowStyle", $Style);
}
//End Set Row Style
//Custom Code @43-2A29BDB7
// -------------------------
// Write your own code here.
global $FileName;
$querystring = CCGetQueryString("QueryString",array());
$guid = $products_suite_list->v_alm_product_suites->guid->GetValue();
$deleteurl = $FileName."?$querystring&del_guid=$guid&o=delrecord";
$products_suite_list->v_alm_product_suites->lbdelete->SetValue($deleteurl);
// -------------------------
//End Custom Code
//Close products_suite_list_v_alm_product_suites_BeforeShowRow @11-AC46D868
return $products_suite_list_v_alm_product_suites_BeforeShowRow;
}
//End Close products_suite_list_v_alm_product_suites_BeforeShowRow
//products_suite_list_BeforeShow @1-DD53AD1C
function products_suite_list_BeforeShow(& $sender)
{
$products_suite_list_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_list; //Compatibility
//End products_suite_list_BeforeShow
//Custom Code @44-2A29BDB7
// -------------------------
// Write your own code here.
//Delete record operation
$del_guid = CCGetFromGet("del_guid","");
$o = CCGetFromGet("o","");
if ( ($o == "delrecord") && (strlen($del_guid) > 0) ) {
global $FileName;
$params["del_guid"] = $del_guid;
$products = new Alm\Products();
$products->deleteProductSuiteByGuid($params);
$querystring = CCGetQueryString("QueryString",array("o","del_guid"));
//Forcing redirect
header("Location: $FileName?$querystring");
}
// -------------------------
//End Custom Code
//Close products_suite_list_BeforeShow @1-AB240682
return $products_suite_list_BeforeShow;
}
//End Close products_suite_list_BeforeShow
?>