本文整理汇总了PHP中GetOrderTypeAsSQL函数的典型用法代码示例。如果您正苦于以下问题:PHP GetOrderTypeAsSQL函数的具体用法?PHP GetOrderTypeAsSQL怎么用?PHP GetOrderTypeAsSQL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetOrderTypeAsSQL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
//.........这里部分代码省略.........
示例2: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for FEC_WINK field
//
$editor = new DateTimeEdit('fec_wink_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('FEC WINK', 'FEC_WINK', $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 USERNAME_EMISOR field
//
$editor = new ComboBox('username_emisor_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 EMISOR', 'USERNAME_EMISOR', $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 USERNAME_RECEPTOR field
//
$editor = new ComboBox('username_receptor_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 RECEPTOR', 'USERNAME_RECEPTOR', $editor, $this->dataset, 'USERNAME', 'ES_ADMIN', $lookupDataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
//.........这里部分代码省略.........
示例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',
//.........这里部分代码省略.........
示例4: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for id_tipo_accion field
//
$editor = new ComboBox('id_tipo_accion_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new PgConnectionFactory(),
GetConnectionOptions(),
'"public"."sga_tipo_accion"');
$field = new IntegerField('id_tipo_accion', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('no_tipo_accion');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('id_tipo_accion_padre');
$lookupDataset->AddField($field, false);
$field = new StringField('ds_referencia');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn(
'Tipo Accion',
'id_tipo_accion',
$editor,
$this->dataset, 'id_tipo_accion', 'ds_referencia', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for id_tipo_espacio field
//
$editor = new ComboBox('id_tipo_espacio_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new PgConnectionFactory(),
GetConnectionOptions(),
'"public"."sga_tipo_espacio"');
$field = new IntegerField('id_tipo_espacio', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('no_tipo_espacio');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('id_tipo_espacio_padre');
$lookupDataset->AddField($field, false);
$field = new StringField('ds_referencia');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn(
'Tipo Espacio',
'id_tipo_espacio',
$editor,
$this->dataset, 'id_tipo_espacio', 'ds_referencia', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for id_tipo_bien field
//
$editor = new ComboBox('id_tipo_bien_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new PgConnectionFactory(),
GetConnectionOptions(),
'"public"."sga_tipo_bien"');
$field = new IntegerField('id_tipo_bien', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('no_tipo_bien');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('id_tipo_bien_padre');
$lookupDataset->AddField($field, false);
$field = new StringField('ds_referencia');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('ds_referencia', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn(
'Tipo Bien',
'id_tipo_bien',
$editor,
$this->dataset, 'id_tipo_bien', 'ds_referencia', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for id_origen field
//
$editor = new ComboBox('id_origen_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new PgConnectionFactory(),
GetConnectionOptions(),
'"public"."sga_origen"');
$field = new IntegerField('id_origen', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('no_origen');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
//.........这里部分代码省略.........
示例5: ProcessMessages
function ProcessMessages()
{
/* $primaryKeyValues = array();
ExtractPrimaryKeyValues($primaryKeyValues, METHOD_GET);
if (count($primaryKeyValues) > 0)
$this->grid->GetDataset()->SetSingleRecordState($primaryKeyValues);
*/
$orderColumn = $this->grid->GetOrderColumnFieldName();
$orderType = $this->grid->GetOrderType();
if (isset($orderType) && isset($orderColumn)) {
$this->grid->GetDataset()->SetOrderBy($orderColumn, GetOrderTypeAsSQL($orderType));
}
foreach ($this->grid->GetViewColumns() as $column) {
$column->ProcessMessages();
}
}
示例6: ApplyOrderingToDataset
private function ApplyOrderingToDataset()
{
if ($this->orderByFieldName != '') {
$this->dataset->setOrderByField($this->orderByFieldName, GetOrderTypeAsSQL($this->orderType));
}
}
示例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);
//.........这里部分代码省略.........
示例8: 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);
}
}
示例9: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// 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);
//
// 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);
}
}
示例10: 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 {
//.........这里部分代码省略.........
示例11: 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);
}
}
示例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);
//.........这里部分代码省略.........
示例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);
}
}
示例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')));
}
示例15: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for off-numoff field
//
$editor = new TextEdit('off-numoff_edit');
$editColumn = new CustomEditColumn('Off-numoff', 'off-numoff', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for off-codcli field
//
$editor = new ComboBox('off-codcli_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`clienti`');
$field = new IntegerField('id', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('cli-codcli');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('cli-ragsoc');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('cli-codlis');
$lookupDataset->AddField($field, false);
$field = new DateTimeField('datains');
$lookupDataset->AddField($field, false);
$field = new DateTimeField('datamod');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('cli-ragsoc', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('cod.Cliente', 'off-codcli', $editor, $this->dataset, 'cli-codcli', 'cli-ragsoc', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for off-descriz field
//
$editor = new TextEdit('off-descriz_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Off-descriz', 'off-descriz', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for off-gg-termine-consegna field
//
$editor = new TextEdit('off-gg-termine-consegna_edit');
$editColumn = new CustomEditColumn('Off-gg-termine-consegna', 'off-gg-termine-consegna', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for off-datains field
//
$editor = new DateTimeEdit('off-datains_edit', true, 'd-m-Y', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Data inserimento', 'off-datains', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for off-dataeva field
//
$editor = new DateTimeEdit('off-dataeva_edit', true, 'd-m-Y', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Data evasione', 'off-dataeva', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for datains field
//
$editor = new DateTimeEdit('datains_edit', false, 'd-m-Y', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Data ins', 'datains', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}