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


PHP TableDataset::setOrderByField方法代码示例

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


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

示例1: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for no_tipo_espacio field
     //
     $editor = new TextEdit('no_tipo_espacio_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('No Tipo Espacio', 'no_tipo_espacio', $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 id_tipo_espacio_padre field
     //
     $editor = new ComboBox('id_tipo_espacio_padre_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_tipo_espacio"');
     $field = new IntegerField('id_tipo_espacio', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_tipo_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_espacio_padre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('no_tipo_espacio', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Id Tipo Espacio Padre', 
         'id_tipo_espacio_padre', 
         $editor, 
         $this->dataset, 'id_tipo_espacio', 'no_tipo_espacio', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for ds_referencia field
     //
     $editor = new TextAreaEdit('ds_referencia_edit', 50, 8);
     $editColumn = new CustomEditColumn('Ds Referencia', 'ds_referencia', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant())
     {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     }
     else
     {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:jsrxar,项目名称:dto,代码行数:61,代码来源:tipo_espacio.php

示例2: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id_tipo_accion field
     //
     $editor = new ComboBox('id_tipo_accion_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_tipo_accion"');
     $field = new IntegerField('id_tipo_accion', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_tipo_accion');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_accion_padre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Tipo Accion', 
         'id_tipo_accion', 
         $editor, 
         $this->dataset, 'id_tipo_accion', 'ds_referencia', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_tipo_espacio field
     //
     $editor = new ComboBox('id_tipo_espacio_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_tipo_espacio"');
     $field = new IntegerField('id_tipo_espacio', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_tipo_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_espacio_padre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Tipo Espacio', 
         'id_tipo_espacio', 
         $editor, 
         $this->dataset, 'id_tipo_espacio', 'ds_referencia', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_sector field
     //
     $editor = new ComboBox('id_sector_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_sector"');
     $field = new IntegerField('id_sector', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_sector');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('no_sector', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Sector', 
         'id_sector', 
         $editor, 
         $this->dataset, 'id_sector', 'no_sector', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_origen field
     //
     $editor = new ComboBox('id_origen_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_origen"');
     $field = new IntegerField('id_origen', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_origen');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('no_origen', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Origen', 
         'id_origen', 
//.........这里部分代码省略.........
开发者ID:jsrxar,项目名称:dto,代码行数:101,代码来源:accion.php

示例3: 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"."sga_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);
     $field = new IntegerField('id_sector');
     $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"."sga_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 StringField('co_plano');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_planta');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_sector');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Espacio', 
         'id_espacio', 
         $editor, 
         $this->dataset, 'id_espacio', 'ds_referencia', $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"."sga_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);
//.........这里部分代码省略.........
开发者ID:jsrxar,项目名称:dto,代码行数:101,代码来源:tarea_plan.php

示例4: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id_tipo_accion field
     //
     $editor = new ComboBox('id_tipo_accion_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_tipo_accion"');
     $field = new IntegerField('id_tipo_accion', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_tipo_accion');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_accion_padre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Tipo Accion', 
         'id_tipo_accion', 
         $editor, 
         $this->dataset, 'id_tipo_accion', 'ds_referencia', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_tipo_espacio field
     //
     $editor = new ComboBox('id_tipo_espacio_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_tipo_espacio"');
     $field = new IntegerField('id_tipo_espacio', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_tipo_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_espacio_padre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Tipo Espacio', 
         'id_tipo_espacio', 
         $editor, 
         $this->dataset, 'id_tipo_espacio', 'ds_referencia', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_tipo_bien field
     //
     $editor = new ComboBox('id_tipo_bien_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_tipo_bien"');
     $field = new IntegerField('id_tipo_bien', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_tipo_bien');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_bien_padre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Tipo Bien', 
         'id_tipo_bien', 
         $editor, 
         $this->dataset, 'id_tipo_bien', 'ds_referencia', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for id_origen field
     //
     $editor = new ComboBox('id_origen_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_origen"');
     $field = new IntegerField('id_origen', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_origen');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
//.........这里部分代码省略.........
开发者ID:jsrxar,项目名称:dto,代码行数:101,代码来源:accion.php

示例5: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for off-numoff field
     //
     $editor = new TextEdit('off-numoff_edit');
     $editColumn = new CustomEditColumn('Off-numoff', 'off-numoff', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for off-codcli field
     //
     $editor = new ComboBox('off-codcli_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`clienti`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('cli-codcli');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('cli-ragsoc');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('cli-codlis');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datains');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datamod');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('cli-ragsoc', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('cod.Cliente', 'off-codcli', $editor, $this->dataset, 'cli-codcli', 'cli-ragsoc', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for off-descriz field
     //
     $editor = new TextEdit('off-descriz_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('Off-descriz', 'off-descriz', $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 off-gg-termine-consegna field
     //
     $editor = new TextEdit('off-gg-termine-consegna_edit');
     $editColumn = new CustomEditColumn('Off-gg-termine-consegna', 'off-gg-termine-consegna', $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 off-datains field
     //
     $editor = new DateTimeEdit('off-datains_edit', true, 'd-m-Y', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Data inserimento', 'off-datains', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for off-dataeva field
     //
     $editor = new DateTimeEdit('off-dataeva_edit', true, 'd-m-Y', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Data evasione', 'off-dataeva', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for datains field
     //
     $editor = new DateTimeEdit('datains_edit', false, 'd-m-Y', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Data ins', 'datains', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:eroncalli,项目名称:atig,代码行数:87,代码来源:offerte.php

示例6: 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

示例7: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id_insumo field
     //
     $editor = new ComboBox('id_insumo_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."ods_insumo"');
     $field = new IntegerField('id_insumo', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_insumo');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_insumo');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('no_insumo', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Id Insumo', 
         'id_insumo', 
         $editor, 
         $this->dataset, 'id_insumo', 'no_insumo', $lookupDataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant())
     {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     }
     else
     {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:jsrxar,项目名称:dto,代码行数:40,代码来源:requiere.php

示例8: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for ofa-numoff field
     //
     $editor = new TextEdit('ofa-numoff_edit');
     $editColumn = new CustomEditColumn('Numero Offerta', 'ofa-numoff', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-codart field
     //
     $editor = new ComboBox('ofa-codart_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`articoli`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('art-codart');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('art-descart');
     $lookupDataset->AddField($field, false);
     $field = new StringField('art-dessup');
     $lookupDataset->AddField($field, false);
     $field = new StringField('art-codprod');
     $lookupDataset->AddField($field, false);
     $field = new StringField('art-codfam');
     $lookupDataset->AddField($field, false);
     $field = new StringField('unita_misura');
     $lookupDataset->AddField($field, false);
     $field = new StringField('art-gruppo-merc');
     $lookupDataset->AddField($field, false);
     $field = new StringField('art-categoria-omogenea');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('art-lungsmu');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datains');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datamod');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('art-descart', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Codice articolo', 'ofa-codart', $editor, $this->dataset, 'art-codart', 'art-descart', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-descart field
     //
     $editor = new TextEdit('ofa-descart_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Ofa-descart', 'ofa-descart', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-lunghezza field
     //
     $editor = new TextEdit('ofa-lunghezza_edit');
     $editColumn = new CustomEditColumn('Lunghezza', 'ofa-lunghezza', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-larghezza field
     //
     $editor = new TextEdit('ofa-larghezza_edit');
     $editColumn = new CustomEditColumn('Ofa-larghezza', 'ofa-larghezza', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-spessore field
     //
     $editor = new TextEdit('ofa-spessore_edit');
     $editColumn = new CustomEditColumn('Ofa-spessore', 'ofa-spessore', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-quantita field
     //
     $editor = new TextEdit('ofa-quantita_edit');
     $editColumn = new CustomEditColumn('Ofa-quantita', 'ofa-quantita', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-przacq-net field
     //
     $editor = new TextEdit('ofa-przacq-net_edit');
     $editColumn = new CustomEditColumn('Ofa-przacq-net', 'ofa-przacq-net', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ofa-przacq-lor field
     //
     $editor = new TextEdit('ofa-przacq-lor_edit');
//.........这里部分代码省略.........
开发者ID:eroncalli,项目名称:atig,代码行数:101,代码来源:offerte_dettaglio_articoli.php

示例9: CreateGridAdvancedSearchControl

 protected function CreateGridAdvancedSearchControl(Grid $grid)
 {
     $this->AdvancedSearchControl = new AdvancedSearchControl('clientiasearch', $this->dataset, $this->GetLocalizerCaptions(), $this->GetColumnVariableContainer(), $this->CreateLinkBuilder());
     $this->AdvancedSearchControl->setTimerInterval(1000);
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`clienti`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('cli-codcli');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('cli-ragsoc');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('cli-codlis');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datains');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datamod');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('cli-codcli', GetOrderTypeAsSQL(otAscending));
     $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateLookupSearchInput('cli-codcli', $this->RenderText('Codice Cliente'), $lookupDataset, 'cli-codcli', 'cli-codcli', false, 8));
     $this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('cli-ragsoc', $this->RenderText('Ragione sociale')));
 }
开发者ID:eroncalli,项目名称:atig,代码行数:24,代码来源:clienti.php

示例10: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id_tarea_plan field
     //
     $editor = new ComboBox('id_tarea_plan_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."ods_tarea_plan"');
     $field = new IntegerField('id_tarea_plan', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('id_accion');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_bien');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_periodicidad');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_detalle');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_espacio');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('id_periodicidad', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Id Tarea Plan', 
         'id_tarea_plan', 
         $editor, 
         $this->dataset, 'id_tarea_plan', 'id_periodicidad', $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 fe_ejecucion field
     //
     $editor = new DateTimeEdit('fe_ejecucion_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Fecha Ejecucion', 'fe_ejecucion', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for fl_realizada field
     //
     $editor = new CheckBox('fl_realizada_edit');
     $editColumn = new CustomEditColumn('Fl Realizada', 'fl_realizada', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $editColumn->SetAllowSetToDefault(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for ds_observaciones field
     //
     $editor = new TextAreaEdit('ds_observaciones_edit', 50, 8);
     $editColumn = new CustomEditColumn('Ds Observaciones', 'ds_observaciones', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant())
     {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     }
     else
     {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:jsrxar,项目名称:dto,代码行数:75,代码来源:tarea.php

示例11: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id_persona field
     //
     $editor = new ComboBox('id_persona_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."ods_persona"');
     $field = new IntegerField('id_persona', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('id_tipo_persona');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('co_dni_cuit');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('co_legajo');
     $lookupDataset->AddField($field, false);
     $field = new StringField('no_persona');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_empresa');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_area');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('id_tipo_persona', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Id Persona', 'id_persona', $editor, $this->dataset, 'id_persona', 'id_tipo_persona', $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_lugar field
     //
     $editor = new ComboBox('id_lugar_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."ods_lugar"');
     $field = new IntegerField('id_lugar', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('co_lugar');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('no_lugar');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_direccion');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('co_lugar', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Id Lugar', 'id_lugar', $editor, $this->dataset, 'id_lugar', 'co_lugar', $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_origen_lectura field
     //
     $editor = new ComboBox('id_origen_lectura_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."ods_origen_lectura"');
     $field = new IntegerField('id_origen_lectura');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('co_origen_lectura');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('no_origen_lectura');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('co_origen_lectura', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Id Origen Lectura', 'id_origen_lectura', $editor, $this->dataset, 'id_origen_lectura', 'co_origen_lectura', $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 fe_fecha_lectura field
     //
     $editor = new DateTimeEdit('fe_fecha_lectura_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Fe Fecha Lectura', 'fe_fecha_lectura', $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 no_usuario field
     //
     $editor = new TextEdit('no_usuario_edit');
     $editor->SetSize(10);
     $editor->SetMaxLength(10);
     $editColumn = new CustomEditColumn('Nombre Usuario', 'no_usuario', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for ds_usuario field
     //
     $editor = new TextEdit('ds_usuario_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('Descripción Usuario', 'ds_usuario', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
//.........这里部分代码省略.........
开发者ID:jsrxar,项目名称:dto,代码行数:101,代码来源:lectura.php

示例12: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id_persona field
     //
     $editor = new ComboBox('id_persona_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."ods_persona"');
     $field = new IntegerField('id_persona', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('id_tipo_persona');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('co_dni_cuit');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('co_legajo');
     $lookupDataset->AddField($field, false);
     $field = new StringField('no_persona');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_empresa');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_area');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('id_tipo_persona', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Id Persona', 'id_persona', $editor, $this->dataset, 'id_persona', 'id_tipo_persona', $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_tarea field
     //
     $editor = new ComboBox('id_tarea_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."ods_tarea"');
     $field = new IntegerField('id_tarea', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('id_tarea_plan');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('fe_ejecucion');
     $lookupDataset->AddField($field, false);
     $field = new BooleanField('fl_realizada');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_observaciones');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('id_tarea_plan', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Id Tarea', 'id_tarea', $editor, $this->dataset, 'id_tarea', 'id_tarea_plan', $lookupDataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:jsrxar,项目名称:dto,代码行数:62,代码来源:realiza.php

示例13: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for voc-codvoce field
     //
     $editor = new TextEdit('voc-codvoce_edit');
     $editor->SetSize(5);
     $editor->SetMaxLength(5);
     $editColumn = new CustomEditColumn('Codice voce di costo', 'voc-codvoce', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for voc-descriz field
     //
     $editor = new TextEdit('voc-descriz_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Descrizione', 'voc-descriz', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for voc-semanual field
     //
     $editor = new CheckBox('voc-semanual_edit');
     $editColumn = new CustomEditColumn('Manuale', 'voc-semanual', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $editColumn->SetAllowSetToDefault(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for voc-formula field
     //
     $editor = new ComboBox('voc-formula_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`formule_calcolo`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('codice');
     $lookupDataset->AddField($field, false);
     $field = new StringField('formula');
     $lookupDataset->AddField($field, false);
     $field = new StringField('critcalc');
     $lookupDataset->AddField($field, false);
     $field = new StringField('descrizione');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datains');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datamod');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('formula', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Formula di calcolo', 'voc-formula', $editor, $this->dataset, 'codice', 'formula', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for voc-flagart field
     //
     $editor = new ComboBox('voc-flagart_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editor->AddValue('S', $this->RenderText('Si'));
     $editor->AddValue('N', $this->RenderText('No'));
     $editColumn = new CustomEditColumn('Prevede altri articoli', 'voc-flagart', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $editColumn->SetInsertDefaultValue($this->RenderText('N'));
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for voc-przunit field
     //
     $editor = new TextEdit('voc-przunit_edit');
     $editColumn = new CustomEditColumn('Prezzo unitario', 'voc-przunit', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:eroncalli,项目名称:atig,代码行数:86,代码来源:voci_costo.php

示例14: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for art-codart field
     //
     $editor = new TextEdit('art-codart_edit');
     $editColumn = new CustomEditColumn('Codice articolo', 'art-codart', $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 art-descart field
     //
     $editor = new TextEdit('art-descart_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(300);
     $editColumn = new CustomEditColumn('Descrizione', 'art-descart', $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 art-codfam field
     //
     $editor = new ComboBox('art-codfam_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`famiglie`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('fam-codfam');
     $lookupDataset->AddField($field, false);
     $field = new StringField('fam-descriz');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datains');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datamod');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('fam-descriz', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Famiglia', 'art-codfam', $editor, $this->dataset, 'fam-codfam', 'fam-descriz', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for art-codprod field
     //
     $editor = new TextEdit('art-codprod_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Codice Produzione', 'art-codprod', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for art-gruppo-merc field
     //
     $editor = new TextEdit('art-gruppo-merc_edit');
     $editor->SetSize(5);
     $editor->SetMaxLength(5);
     $editColumn = new CustomEditColumn('Gruppo merceologico', 'art-gruppo-merc', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for art-categoria-omogenea field
     //
     $editor = new TextEdit('art-categoria-omogenea_edit');
     $editor->SetSize(5);
     $editor->SetMaxLength(5);
     $editColumn = new CustomEditColumn('Categoria omogenea', 'art-categoria-omogenea', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for unita_misura field
     //
     $editor = new TextEdit('unita_misura_edit');
     $editor->SetSize(3);
     $editor->SetMaxLength(3);
     $editColumn = new CustomEditColumn('Unita Misura', 'unita_misura', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:eroncalli,项目名称:atig,代码行数:91,代码来源:articoli.php

示例15: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for art-codfam field
     //
     $editor = new ComboBox('art-codfam_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`famiglie`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('fam-codfam');
     $lookupDataset->AddField($field, false);
     $field = new StringField('fam-descriz');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datains');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datamod');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('fam-descriz', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Codice famiglia', 'art-codfam', $editor, $this->dataset, 'fam-codfam', 'fam-descriz', $lookupDataset);
     $editColumn->SetReadOnly(true);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for art-codart field
     //
     $editor = new TextEdit('art-codart_edit');
     $editor->SetSize(10);
     $editor->SetMaxLength(10);
     $editColumn = new CustomEditColumn('Codice Articolo', 'art-codart', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for art-descart field
     //
     $editor = new TextEdit('art-descart_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Descrizione', 'art-descart', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:eroncalli,项目名称:atig,代码行数:52,代码来源:famiglie.php


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