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


PHP TableDataset::AddField方法代码示例

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


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

示例1: CreateDataset

 /**
  * @param ConnectionFactory $connectionFactory
  * @param array $connectionOptions
  * @param string $tableName
  * @param string $userNameFieldName
  * @param string $passwordFieldName
  */
 private function CreateDataset(ConnectionFactory $connectionFactory, $connectionOptions, $tableName, $userNameFieldName, $passwordFieldName)
 {
     $this->dataset = new TableDataset($connectionFactory, $connectionOptions, $tableName);
     $field = new StringField($userNameFieldName);
     $this->dataset->AddField($field, true);
     $field = new StringField($passwordFieldName);
     $this->dataset->AddField($field, false);
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:15,代码来源:tablebased_auth.php

示例2: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for USERNAME field
     //
     $editor = new ComboBox('username_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."PERSONA"');
     $field = new StringField('USERNAME');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('ES_ADMIN');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new DateField('NACIMIENTO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('PRIMER_APELLIDO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('SEGUNDO_APELLIDO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('NOMBRE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('GENERO_ID');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('CIUDAD_ID');
     $lookupDataset->AddField($field, false);
     $field = new StringField('SLOGAN');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('EMAIL');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('CLAVE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('ES_ADMIN', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('USERNAME', 'USERNAME', $editor, $this->dataset, 'USERNAME', 'ES_ADMIN', $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 ES_REAL field
     //
     $editor = new TextEdit('es_real_edit');
     $editor->SetSize(1);
     $editor->SetMaxLength(1);
     $editColumn = new CustomEditColumn('ES REAL', 'ES_REAL', $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 COLOR_OJOS_ID field
     //
     $editor = new ComboBox('color_ojos_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."COLOR_OJOS"');
     $field = new IntegerField('COLOR_OJOS_ID');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('NOMBRE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('NOMBRE', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('COLOR OJOS ID', 'COLOR_OJOS_ID', $editor, $this->dataset, 'COLOR_OJOS_ID', 'NOMBRE', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for COLOR_PIEL_ID field
     //
     $editor = new ComboBox('color_piel_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."COLOR_PIEL"');
     $field = new IntegerField('COLOR_PIEL_ID');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('NOMBRE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
//.........这里部分代码省略.........
开发者ID:kcallow,项目名称:MatchMe,代码行数:101,代码来源:GE.PERSONA_DISPONIBLE.php

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

示例4: CreateUserGrantsDataset

 private function CreateUserGrantsDataset()
 {
     $result = new TableDataset($this->connectionFactory, $this->connectionOptions, $this->userPermsTable);
     $result->AddField(new IntegerField($this->userPerms_UserId), true);
     $result->AddField(new StringField($this->userPerms_PageName), true);
     $result->AddField(new StringField($this->userPerms_Grant), true);
     return $result;
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:8,代码来源:table_based_user_grants_manager.php

示例5: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for programm_id field
     //
     $editor = new ComboBox('programm_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`program`');
     $field = new IntegerField('program_id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('program_name');
     $lookupDataset->AddField($field, false);
     $field = new StringField('year');
     $lookupDataset->AddField($field, false);
     $field = new StringField('multi');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('description');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('lead');
     $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('progress');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('program_name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Project Type', 'programm_id', $editor, $this->dataset, 'program_id', 'program_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);
     //
     // Edit column for project_name field
     //
     $editor = new TextEdit('project_name_edit');
     $editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $validator = new CustomRegExpValidator('^[A-Za-z0-9 ]+[-]*[A-Za-z0-9 ]*$', StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RegExpValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $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);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
     $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', true, 'Y-m-d', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
     $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 year field
     //
     $editor = new TextEdit('year_edit');
     $editColumn = new CustomEditColumn('Year', 'year', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('2015'));
     $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 notes field
     //
     $editor = new TextAreaEdit('notes_edit', 50, 8);
     $editColumn = new CustomEditColumn('Objectives', 'notes', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for priority field
     //
     $editor = new ComboBox('priority_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`Priority`');
     $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('Priority', 'priority', $editor, $this->dataset, 'Name', 'Name', $lookupDataset);
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:project.php

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

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

示例8: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for office_id field
     //
     $editor = new ComboBox('office_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."office"');
     $field = new IntegerField('id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('title');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('num_positions');
     $lookupDataset->AddField($field, false);
     $field = new StringField('responsibilities');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('term_length_months');
     $lookupDataset->AddField($field, false);
     $field = new StringField('filing_fee');
     $lookupDataset->AddField($field, false);
     $field = new BooleanField('partisan');
     $lookupDataset->AddField($field, false);
     $field = new StringField('age_requirements');
     $lookupDataset->AddField($field, false);
     $field = new StringField('res_requirements');
     $lookupDataset->AddField($field, false);
     $field = new StringField('prof_requirements');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('salary');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('office_rank');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('title', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Office Title', 'office_id', $editor, $this->dataset, 'id', 'title', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editor->SetSize(35);
     $editor->SetMaxLength(35);
     $editColumn = new CustomEditColumn('Document Name or Description', 'name', $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 link field
     //
     $editor = new TextAreaEdit('link_edit', 50, 8);
     $editColumn = new CustomEditColumn('URL to Document', 'link', $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);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:68,代码来源:public.office_docs.php

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

示例10: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for FOTO_ID field
     //
     $editor = new TextEdit('foto_id_edit');
     $editColumn = new CustomEditColumn('FOTO ID', 'FOTO_ID', $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 RUTA field
     //
     $editor = new ImageUploader('ruta_edit');
     $editor->SetShowImage(false);
     $editColumn = new FileUploadingColumn('RUTA', 'RUTA', $editor, $this->dataset, false, false, 'GE_FOTOGrid_RUTA_handler_insert');
     $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 USERNAME field
     //
     $editor = new ComboBox('username_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."PERSONA"');
     $field = new StringField('USERNAME');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('ES_ADMIN');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new DateField('NACIMIENTO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('PRIMER_APELLIDO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('SEGUNDO_APELLIDO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('NOMBRE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('GENERO_ID');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('CIUDAD_ID');
     $lookupDataset->AddField($field, false);
     $field = new StringField('SLOGAN');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('EMAIL');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('CLAVE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('ES_ADMIN', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('USERNAME', 'USERNAME', $editor, $this->dataset, 'USERNAME', 'ES_ADMIN', $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 TITULO field
     //
     $editor = new TextEdit('titulo_edit');
     $editor->SetSize(40);
     $editor->SetMaxLength(40);
     $editColumn = new CustomEditColumn('TITULO', 'TITULO', $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);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:kcallow,项目名称:MatchMe,代码行数:86,代码来源:GE.FOTO.php

示例11: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for state field
     //
     $editor = new ComboBox('state_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."state"');
     $field = new StringField('abbr');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('name');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('State', 'state', $editor, $this->dataset, 'abbr', 'name', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('District Name', 'name', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for level_id field
     //
     $editor = new ComboBox('level_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."level"');
     $field = new StringField('id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('name');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('rank');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Level of Government', 'level_id', $editor, $this->dataset, 'id', 'name', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for election_div_id field
     //
     $editor = new MultiLevelComboBoxEditor('election_div_id_edit', $this->CreateLinkBuilder());
     $dataset0 = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."state"');
     $field = new StringField('abbr');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, true);
     $field = new StringField('name');
     $dataset0->AddField($field, false);
     $editor->AddLevel($dataset0, 'abbr', 'name', $this->RenderText('State'), null);
     $dataset1 = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."election_div"');
     $field = new IntegerField('id');
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, true);
     $field = new StringField('name');
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_addr1');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_addr2');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_city');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_state');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_zip');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_addr1');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_addr2');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_city');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_state');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_zip');
     $dataset1->AddField($field, false);
     $field = new StringField('phone');
     $dataset1->AddField($field, false);
     $field = new StringField('fax');
     $dataset1->AddField($field, false);
     $field = new StringField('website');
     $dataset1->AddField($field, false);
     $field = new StringField('notes');
     $dataset1->AddField($field, false);
     $dataset1->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editor->AddLevel($dataset1, 'id', 'name', $this->RenderText('Election Division'), new ForeignKeyInfo('abbr', 'phys_addr_state'));
     $editColumn = new MultiLevelLookupEditColumn('Election Division', 'election_div_id', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
//.........这里部分代码省略.........
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:101,代码来源:public.district.php

示例12: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for username field
     //
     $editor = new TextEdit('username_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('Username', 'username', $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 email field
     //
     $editor = new TextEdit('email_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('Email', 'email', $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 password field
     //
     $editor = new TextEdit('password_edit');
     $editor->SetPasswordMode(true);
     $editColumn = new CustomEditColumn('Password', 'password', $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 dept_id field
     //
     $editor = new ComboBox('dept_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`department`');
     $field = new IntegerField('DEPT_ID', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('DEPARTMENT');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('MANAGER');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('DIRECTOR');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('LOCATION');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('PHONE_NO');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('DEPARTMENT', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Department', 'dept_id', $editor, $this->dataset, 'DEPT_ID', 'DEPARTMENT', $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 position field
     //
     $editor = new TextEdit('position_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('Position', 'position', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for emp_number field
     //
     $editor = new TextEdit('emp_number_edit');
     $editor->SetSize(20);
     $editor->SetMaxLength(20);
     $editColumn = new CustomEditColumn('Employee No', 'emp_number', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for picture field
     //
     $editor = new ImageUploader('picture_edit');
     $editor->SetShowImage(true);
     $editColumn = new UploadFileToFolderColumn('Picture', 'picture', $editor, $this->dataset, false, false, 'images');
     $editColumn->OnCustomFileName->AddListener('picture_GenerateFileName_insert', $this);
     $editColumn->SetReplaceUploadedFileIfExist(true);
     $editColumn->SetGenerationImageThumbnails('picture', 'images', Delegate::CreateFromMethod($this, 'picture_Thumbnail_GenerateFileName_insert'), new ImageFitByHeightResizeFilter(100));
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:staff.php

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

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

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


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