当前位置: 首页>>代码示例>>PHP>>正文


PHP TableDataset::AddCustomCondition方法代码示例

本文整理汇总了PHP中TableDataset::AddCustomCondition方法的典型用法代码示例。如果您正苦于以下问题:PHP TableDataset::AddCustomCondition方法的具体用法?PHP TableDataset::AddCustomCondition怎么用?PHP TableDataset::AddCustomCondition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TableDataset的用法示例。


在下文中一共展示了TableDataset::AddCustomCondition方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for project_id field
     //
     $editor = new ComboBox('project_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`project`');
     $field = new IntegerField('project_id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('programm_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('project_name');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_start');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_end');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('approved_budget');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('priority');
     $lookupDataset->AddField($field, false);
     $field = new StringField('lead');
     $lookupDataset->AddField($field, false);
     $field = new StringField('level_of_service');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('multi_year');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('public_engagement');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('year');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('approved');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('progress');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('staff_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('dept_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('budget_spent');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('admin_flag');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('project_name', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), '%CURRENT_USER_ID%  = 1  OR project.lead=%CURRENT_USER_ID%'));
     $editColumn = new LookUpEditColumn('Parent Project', 'project_id', $editor, $this->dataset, 'project_id', 'project_name', $lookupDataset);
     $editColumn->SetReadOnly(true);
     $editColumn->setEnabled(false);
     $editColumn->SetAllowSetToNull(true);
     $editColumn->SetInsertDefaultValue($this->RenderText('%project_name%'));
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_start field
     //
     $editor = new DateTimeEdit('date_start_edit', false, 'Y-m-d', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_end field
     //
     $editor = new DateTimeEdit('date_end_edit', false, 'Y-m-d', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for task_name field
     //
     $editor = new ComboBox('task_name_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task_names`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Name');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Task Name', 'task_name', $editor, $this->dataset, 'Name', 'Name', $lookupDataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:project.php

示例2: CreateGrid


//.........这里部分代码省略.........
     $field = new StringField('Pais_Domicilio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Telefono');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Ciudad');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Contacto');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('TelContacto');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Email');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('CIUU');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('empresa_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('codigo');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('regimen');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('estado');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('RazonSocial', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_edit_Cliente_RazonSocial_search', 'idClientes', 'RazonSocial', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`clientes`');
     $field = new IntegerField('idClientes', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('Tipo_Documento');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Num_Identificacion');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('DV');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Primer_Apellido');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Segundo_Apellido');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Primer_Nombre');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('Otros_Nombres');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('RazonSocial');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Direccion');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Cod_Dpto');
     $field->SetIsNotNull(true);
开发者ID:Kenovix,项目名称:san-miguel,代码行数:67,代码来源:cartera.php

示例3: CreateGrid

 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'listino_articoliGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(true);
     $result->SetAllowOrdering(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $result->BeforeUpdateRecord->AddListener('listino_articoliGrid' . '_' . 'BeforeUpdateRecord', $this);
     $result->BeforeInsertRecord->AddListener('listino_articoliGrid' . '_' . 'BeforeInsertRecord', $this);
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(false);
     $this->SetExportToWordAvailable(false);
     $this->SetExportToXmlAvailable(false);
     $this->SetExportToCsvAvailable(false);
     $this->SetExportToPdfAvailable(false);
     $this->SetPrinterFriendlyAvailable(false);
     $this->SetSimpleSearchAvailable(false);
     $this->SetAdvancedSearchAvailable(false);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(false);
     //
     // Http Handlers
     //
     //
     // View column for lisdesc field
     //
     $column = new TextViewColumn('lisdesc', 'Descrizione', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'listino_articoliGrid_lisdesc_handler_list', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for lisdesc field
     //
     $column = new TextViewColumn('lisdesc', 'Descrizione', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'listino_articoliGrid_lisdesc_handler_view', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`');
     $field = new StringField('art-codart');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('descrizione');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_lis-codart_descrizione_search', 'art-codart', 'descrizione', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`');
     $field = new StringField('art-codart');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('descrizione');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'insert_lis-codart_descrizione_search', 'art-codart', 'descrizione', null);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
开发者ID:eroncalli,项目名称:atig,代码行数:79,代码来源:listino_articoli.php

示例4: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id_accion field
     //
     $editor = new ComboBox('id_accion_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."ods_accion"');
     $field = new IntegerField('id_accion', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('id_tipo_espacio');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_bien');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_origen');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_metodologia');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_periodicidad');
     $lookupDataset->AddField($field, false);
     $field = new BooleanField('fl_a_demanda');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_accion');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Acción', 
         'id_accion', 
         $editor, 
         $this->dataset, 'id_accion', 'ds_referencia', $lookupDataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_espacio field
     //
     $editor = new ComboBox('id_espacio_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."ods_espacio"');
     $field = new IntegerField('id_espacio', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('id_tipo_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_espacio_contenedor');
     $lookupDataset->AddField($field, false);
     $field = new StringField('co_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('no_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('nu_planta');
     $lookupDataset->AddField($field, false);
     $field = new StringField('co_plano');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('no_espacio', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), '1=0'));
     $editColumn = new LookUpEditColumn(
         'Espacio', 
         'id_espacio', 
         $editor, 
         $this->dataset, 'id_espacio', 'no_espacio', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_bien field
     //
     $editor = new ComboBox('id_bien_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."ods_bien"');
     $field = new IntegerField('id_bien', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('id_tipo_bien');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_observacion');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_observacion', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), '1=0'));
     $editColumn = new LookUpEditColumn(
//.........这里部分代码省略.........
开发者ID:jsrxar,项目名称:dto,代码行数:101,代码来源:tarea_plan.php

示例5: CreateGrid

 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'clientesGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(true);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     //
     // View column for RazonSocial field
     //
     $column = new TextViewColumn('RazonSocial', 'RazonSocial', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for RazonSocial field
     //
     $editor = new TextEdit('razonsocial_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('RazonSocial', 'RazonSocial', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for RazonSocial field
     //
     $editor = new TextEdit('razonsocial_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('RazonSocial', 'RazonSocial', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'RazonSocial_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`cod_departamentos`');
     $field = new IntegerField('Cod_dpto');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Nombre');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Nombre', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_edit_Cod_Dpto_Nombre_search', 'Cod_dpto', 'Nombre', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`cod_departamentos`');
     $field = new IntegerField('Cod_dpto');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Nombre');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Nombre', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_insert_Cod_Dpto_Nombre_search', 'Cod_dpto', 'Nombre', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`cod_paises`');
     $field = new IntegerField('Codigo');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Pais');
//.........这里部分代码省略.........
开发者ID:Kenovix,项目名称:san-miguel,代码行数:101,代码来源:clientes.php

示例6: CreateGrid

 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'taskGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(true);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $result->OnCustomRenderTotal->AddListener('taskGrid' . '_' . 'OnCustomRenderTotal', $this);
     $result->BeforeUpdateRecord->AddListener('taskGrid' . '_' . 'BeforeUpdateRecord', $this);
     $result->BeforeDeleteRecord->AddListener('taskGrid' . '_' . 'BeforeDeleteRecord', $this);
     $result->BeforeInsertRecord->AddListener('taskGrid' . '_' . 'BeforeInsertRecord', $this);
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddOperationsColumns($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(false);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     $pageView = new timesheetDetailView0taskPage($this, 'Timesheet', 'Timesheet', array('task_id'), GetCurrentUserGrantForDataSource('task.timesheet'), 'UTF-8', 20, 'timesheetDetailEdit0task_handler');
     $pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('task.timesheet'));
     $handler = new PageHTTPHandler('timesheetDetailView0task_handler', $pageView);
     GetApplication()->RegisterHTTPHandler($handler);
     $pageEdit = new timesheetDetailEdit0taskPage($this, array('task_id'), array('task_id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridFortimesheetDetailEdit0taskGrid(), $this->dataset, GetCurrentUserGrantForDataSource('task.timesheet'), 'UTF-8');
     $pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('task.timesheet'));
     $pageEdit->SetShortCaption('Timesheet');
     $pageEdit->SetHeader(GetPagesHeader());
     $pageEdit->SetFooter(GetPagesFooter());
     $pageEdit->SetCaption('Timesheet');
     $pageEdit->SetHttpHandlerName('timesheetDetailEdit0task_handler');
     $handler = new PageHTTPHandler('timesheetDetailEdit0task_handler', $pageEdit);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Name field
     //
     $column = new TextViewColumn('task_name_Name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_Name_handler_list', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for notes field
     //
     $column = new TextViewColumn('notes', 'Notes', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_notes_handler_list', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Name field
     //
     $column = new TextViewColumn('task_name_Name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_Name_handler_view', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for notes field
     //
     $column = new TextViewColumn('notes', 'Notes', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_notes_handler_view', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task_names`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Name');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Name', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_task_name_Name_search', 'Name', 'Name', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task_names`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Name');
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:task.php

示例7: CreateGridAdvancedSearchControl

 protected function CreateGridAdvancedSearchControl(Grid $grid)
 {
     $this->AdvancedSearchControl = new AdvancedSearchControl('timesheetasearch', $this->dataset, $this->GetLocalizerCaptions(), $this->GetColumnVariableContainer(), $this->CreateLinkBuilder());
     $this->AdvancedSearchControl->setTimerInterval(1000);
     $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('name', $this->RenderText('Name')));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task`');
     $field = new IntegerField('task_id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('project_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('assigned_to');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_start');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_end');
     $lookupDataset->AddField($field, false);
     $field = new StringField('task_name');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('hrs');
     $lookupDataset->AddField($field, false);
     $field = new StringField('wo');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('staff_id');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('task_name', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), '  task.assigned_to=%CURRENT_USER_ID%'));
     $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateLookupSearchInput('task_id', $this->RenderText('Task'), $lookupDataset, 'task_id', 'task_name', false, 8));
     $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('hours', $this->RenderText('Hours')));
     $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('notes', $this->RenderText('Notes')));
     $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateDateTimeSearchInput('date', $this->RenderText('Date'), 'Y-m-d'));
 }
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:35,代码来源:timesheet.php

示例8: AddFieldColumns


//.........这里部分代码省略.........
     /* <inline edit column> */
     //
     // Edit column for task_id field
     //
     $editor = new ComboBox('task_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`taskview`');
     $field = new IntegerField('task_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('project_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('assigned_to');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_start');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_end');
     $lookupDataset->AddField($field, false);
     $field = new StringField('task_name');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('hrs');
     $lookupDataset->AddField($field, false);
     $field = new StringField('wo');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('staff_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Task');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Assigned');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Task', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), 'assigned_to=%CURRENT_USER_ID%'));
     $editColumn = new LookUpEditColumn('Project & Task', 'task_id', $editor, $this->dataset, 'task_id', 'Task', $lookupDataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for task_id field
     //
     $editor = new ComboBox('task_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`taskview`');
     $field = new IntegerField('task_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('project_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('assigned_to');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_start');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_end');
     $lookupDataset->AddField($field, false);
     $field = new StringField('task_name');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('hrs');
     $lookupDataset->AddField($field, false);
     $field = new StringField('wo');
     $lookupDataset->AddField($field, false);
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:67,代码来源:multiple_time_entry.php


注:本文中的TableDataset::AddCustomCondition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。