本文整理汇总了PHP中CustomEditColumn::SetReadOnly方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomEditColumn::SetReadOnly方法的具体用法?PHP CustomEditColumn::SetReadOnly怎么用?PHP CustomEditColumn::SetReadOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomEditColumn
的用法示例。
在下文中一共展示了CustomEditColumn::SetReadOnly方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for id_accion field
//
$editor = new TextEdit('id_accion_edit');
$editColumn = new CustomEditColumn('Id Accion', 'id_accion', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// 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->AddEditColumn($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->AddEditColumn($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->AddEditColumn($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"');
//.........这里部分代码省略.........
示例2: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for id_periodicidad field
//
$editor = new TextEdit('id_periodicidad_edit');
$editColumn = new CustomEditColumn('Id Periodicidad', 'id_periodicidad', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for no_periodicidad field
//
$editor = new TextEdit('no_periodicidad_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Nombre Periodicidad', 'no_periodicidad', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for va_frecuencia field
//
$editor = new TextEdit('va_frecuencia_edit');
$editColumn = new CustomEditColumn('Frecuencia', 'va_frecuencia', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
}
示例3: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for id_accion field
//
$editor = new TextEdit('id_accion_edit');
$editColumn = new CustomEditColumn('Id Accion', 'id_accion', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// 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->AddEditColumn($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->AddEditColumn($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->AddEditColumn($editColumn);
//
// Edit column for id_origen field
//
$editor = new ComboBox('id_origen_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
//.........这里部分代码省略.........
示例4: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for name field
//
$editor = new TextEdit('name_edit');
$editor->SetSize(50);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Name', 'name', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_NAME%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for task_id field
//
$editor = new ComboBox('task_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task`');
$field = new IntegerField('task_id', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new IntegerField('project_id');
$lookupDataset->AddField($field, false);
$field = new StringField('assigned_to');
$lookupDataset->AddField($field, false);
$field = new DateField('date_start');
$lookupDataset->AddField($field, false);
$field = new DateField('date_end');
$lookupDataset->AddField($field, false);
$field = new StringField('task_name');
$lookupDataset->AddField($field, false);
$field = new StringField('notes');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('hrs');
$lookupDataset->AddField($field, false);
$field = new StringField('wo');
$lookupDataset->AddField($field, false);
$field = new IntegerField('staff_id');
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('task_name', GetOrderTypeAsSQL(otAscending));
$lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), 'task.assigned_to=%CURRENT_USER_ID%'));
$editColumn = new LookUpEditColumn('Task', 'task_id', $editor, $this->dataset, 'task_id', 'task_name', $lookupDataset);
$editColumn->SetReadOnly(true);
$editColumn->setEnabled(false);
$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 hours field
//
$editor = new SpinEdit('hours_edit');
$editor->SetUseConstraints(true);
$editor->SetMaxValue(12);
$editor->SetMinValue(0);
$editor->SetStep(1);
$editColumn = new CustomEditColumn('Hours', 'hours', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('7'));
$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('Notes', 'notes', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date field
//
$editor = new DateTimeEdit('date_edit', false, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date', 'date', $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);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例5: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for lis-codart field
//
$editor = new AutocomleteComboBox('lis-codart_edit', $this->CreateLinkBuilder());
$editor->SetSize('350px');
$editor->setAllowClear(true);
$editor->setMinimumInputLength(0);
$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));
$editColumn = new DynamicLookupEditColumn('Codice Articolo', 'lis-codart', 'lis-codart_descrizione', 'insert_lis-codart_descrizione_search', $editor, $this->dataset, $lookupDataset, 'art-codart', 'descrizione', '');
$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 lisdesc field
//
$editor = new TextEdit('lisdesc_edit');
$editor->SetSize(100);
$editColumn = new CustomEditColumn('Descrizione', 'lisdesc', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-unimis field
//
$editor = new ComboBox('lis-unimis_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editor->AddValue('N', $this->RenderText('Nessuna'));
$editor->AddValue('LT', $this->RenderText('Litri'));
$editor->AddValue('KG', $this->RenderText('Chili'));
$editor->AddValue('CF', $this->RenderText('Confezione'));
$editor->AddValue('MC', $this->RenderText('Metri cubi'));
$editor->AddValue('MT', $this->RenderText('Metri'));
$editColumn = new CustomEditColumn('Unità misura', 'lis-unimis', $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 lis-przacq field
//
$editor = new TextEdit('lis-przacq_edit');
$editColumn = new CustomEditColumn('Prezzo acquisto', 'lis-przacq', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$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 lis-moltipl field
//
$editor = new TextEdit('lis-moltipl_edit');
$editColumn = new CustomEditColumn('Moltiplicatore', 'lis-moltipl', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetInsertDefaultValue($this->RenderText('5'));
$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 lis-oneriacc field
//
$editor = new TextEdit('lis-oneriacc_edit');
$editor->SetSuffix($this->RenderText('%'));
$editColumn = new CustomEditColumn('Oneri e accessori', 'lis-oneriacc', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$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 lis-scarto field
//
$editor = new TextEdit('lis-scarto_edit');
$editor->SetSuffix($this->RenderText('%'));
$editColumn = new CustomEditColumn('Scarto', 'lis-scarto', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$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 lis-dataini field
//
$editor = new DateTimeEdit('lis-dataini_edit', false, 'd-m-Y', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Data inizio decorrenza', 'lis-dataini', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATETIME%'));
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-datafin field
//.........这里部分代码省略.........
示例6: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for id_tarea_plan field
//
$editor = new TextEdit('id_tarea_plan_edit');
$editColumn = new CustomEditColumn('Id Tarea Plan', 'id_tarea_plan', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// 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->AddEditColumn($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->AddEditColumn($editColumn);
//
// Edit column for id_bien field
//
$editor = new ComboBox('id_bien_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new PgConnectionFactory(),
GetConnectionOptions(),
//.........这里部分代码省略.........
示例7: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for id_metodologia field
//
$editor = new TextEdit('id_metodologia_edit');
$editColumn = new CustomEditColumn('Id Metodologia', 'id_metodologia', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for no_metodologia field
//
$editor = new TextEdit('no_metodologia_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Nombre', 'no_metodologia', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for ds_metodologia field
//
$editor = new HtmlWysiwygEditor('ds_metodologia_edit');
$editor->SetAllowColorControls(true);
$editColumn = new CustomEditColumn('Descripción Metodo', 'ds_metodologia', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($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',
$editor,
$this->dataset, 'id_origen', 'no_origen', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
}
示例8: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for id_espacio field
//
$editor = new TextEdit('id_espacio_edit');
$editColumn = new CustomEditColumn('Id Espacio', 'id_espacio', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($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);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for id_espacio_contenedor field
//
$editor = new ComboBox('id_espacio_contenedor_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);
$lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn(
'Espacio Contenedor',
'id_espacio_contenedor',
$editor,
$this->dataset, 'id_espacio', 'ds_referencia', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for co_espacio field
//
$editor = new TextEdit('co_espacio_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Código Espacio', 'co_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->AddEditColumn($editColumn);
//
// Edit column for no_espacio field
//
$editor = new TextEdit('no_espacio_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Nombre Espacio', 'no_espacio', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
//.........这里部分代码省略.........
示例9: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for project_id field
//
$editor = new ComboBox('project_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Parent Project', 'project_id', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->setEnabled(false);
$editColumn->SetAllowSetToNull(true);
$editColumn->SetInsertDefaultValue($this->RenderText('%project_name%'));
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_start field
//
$editor = new DateTimeEdit('date_start_edit', false, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_end field
//
$editor = new DateTimeEdit('date_end_edit', false, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for task_name field
//
$editor = new ComboBox('task_name_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Task Name', 'task_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 notes field
//
$editor = new TextAreaEdit('notes_edit', 50, 8);
$editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for hrs field
//
$editor = new SpinEdit('hrs_edit');
$editColumn = new CustomEditColumn('Hrs', 'hrs', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('21'));
$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 assigned_to field
//
$editor = new ComboBox('assigned_to_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Assigned To', 'assigned_to', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_ID%'));
$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);
}
}
示例10: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for project_id field
//
$editor = new ComboBox('project_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Project', 'project_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->AddEditColumn($editColumn);
//
// Edit column for task_name field
//
$editor = new TextEdit('task_name_edit');
$editColumn = new CustomEditColumn('Name', 'task_name', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for notes field
//
$editor = new TextAreaEdit('notes_edit', 50, 8);
$editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for hrs field
//
$editor = new SpinEdit('hrs_edit');
$editColumn = new CustomEditColumn('Allocated Hours', 'hrs', $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->AddEditColumn($editColumn);
//
// Edit column for assigned_to field
//
$editor = new ComboBox('assigned_to_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Assigned To', 'assigned_to', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for date_start field
//
$editor = new DateTimeEdit('date_start_edit', false, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($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);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
}
示例11: AddEditColumns
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for id_tarea_plan field
//
$editor = new TextEdit('id_tarea_plan_edit');
$editColumn = new CustomEditColumn('Id Tarea Plan', 'id_tarea_plan', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for id_accion field
//
$editor = new ComboBox('id_accion_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editor->setInlineStyles('width: 440px;');
$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');
$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);
$field = new IntegerField('nu_personas');
$lookupDataset->AddField($field, false);
$field = new TimeField('tm_carga_horaria');
$lookupDataset->AddField($field, false);
$field = new StringField('fe_horas');
$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->AddEditColumn($editColumn);
//
// Edit column for id_espacio field
//
$editor = new ComboBox('id_espacio_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editor->setInlineStyles('width: 440px;');
$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);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//.........这里部分代码省略.........