本文整理汇总了PHP中TextEdit::SetMaxLength方法的典型用法代码示例。如果您正苦于以下问题:PHP TextEdit::SetMaxLength方法的具体用法?PHP TextEdit::SetMaxLength怎么用?PHP TextEdit::SetMaxLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEdit
的用法示例。
在下文中一共展示了TextEdit::SetMaxLength方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for program_name field
//
$editor = new TextEdit('program_name_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn(' Name', 'program_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 description field
//
$editor = new TextAreaEdit('description_edit', 50, 8);
$editColumn = new CustomEditColumn('Description', 'description', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lead field
//
$editor = new ComboBox('lead_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`staff`');
$field = new IntegerField('staff_id', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('username');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('email');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('picture');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('password');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('dept_id');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('position');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('emp_number');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('username', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('Lead', 'lead', $editor, $this->dataset, 'username', 'username', $lookupDataset);
$editColumn->SetCaptionTemplate($this->RenderText('%username%'));
$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_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', false, '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);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例2: 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('Programm Id', 'programm_id', $editor, $this->dataset, 'program_id', 'program_name', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for project_name field
//
$editor = new TextAreaEdit('project_name_edit', 50, 8);
$editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$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->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_end field
//
$editor = new DateTimeEdit('date_end_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for approved_budget field
//
$editor = new TextEdit('approved_budget_edit');
$editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$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);
$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 priority field
//
$editor = new TextEdit('priority_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Priority', 'priority', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lead field
//
$editor = new TextEdit('lead_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Lead', 'lead', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for level_of_service field
//
//.........这里部分代码省略.........
示例3: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// 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->AddInsertColumn($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->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant())
{
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
}
else
{
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例4: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for ESTADO_CIVIL_ID field
//
$editor = new TextEdit('estado_civil_id_edit');
$editColumn = new CustomEditColumn('ESTADO CIVIL ID', 'ESTADO_CIVIL_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 NOMBRE field
//
$editor = new TextEdit('nombre_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('NOMBRE', 'NOMBRE', $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);
}
}
示例5: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for ofv-numoff field
//
$editor = new TextEdit('ofv-numoff_edit');
$editColumn = new CustomEditColumn('Ofv-numoff', 'ofv-numoff', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-codvoce field
//
$editor = new TextEdit('ofv-codvoce_edit');
$editColumn = new CustomEditColumn('Ofv-codvoce', 'ofv-codvoce', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-quantita field
//
$editor = new TextEdit('ofv-quantita_edit');
$editColumn = new CustomEditColumn('Ofv-quantita', 'ofv-quantita', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-lunghezza field
//
$editor = new TextEdit('ofv-lunghezza_edit');
$editColumn = new CustomEditColumn('Ofv-lunghezza', 'ofv-lunghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-larghezza field
//
$editor = new TextEdit('ofv-larghezza_edit');
$editColumn = new CustomEditColumn('Ofv-larghezza', 'ofv-larghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-tiposmu field
//
$editor = new TextEdit('ofv-tiposmu_edit');
$editor->SetSize(1);
$editor->SetMaxLength(1);
$editColumn = new CustomEditColumn('Ofv-tiposmu', 'ofv-tiposmu', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-przacq field
//
$editor = new TextEdit('ofv-przacq_edit');
$editColumn = new CustomEditColumn('Ofv-przacq', 'ofv-przacq', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-sconto field
//
$editor = new TextEdit('ofv-sconto_edit');
$editColumn = new CustomEditColumn('Ofv-sconto', 'ofv-sconto', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-valuni-cal field
//
$editor = new TextEdit('ofv-valuni-cal_edit');
$editColumn = new CustomEditColumn('Ofv-valuni-cal', 'ofv-valuni-cal', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-valuni-fin field
//
$editor = new TextEdit('ofv-valuni-fin_edit');
$editColumn = new CustomEditColumn('Ofv-valuni-fin', 'ofv-valuni-fin', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for datains field
//
$editor = new DateTimeEdit('datains_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Datains', 'datains', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for datamod field
//
$editor = new DateTimeEdit('datamod_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Datamod', 'datamod', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$editColumn->SetAllowSetToDefault(true);
$this->ApplyCommonColumnEditProperties($editColumn);
//.........这里部分代码省略.........
示例6: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for project_id field
//
$editor = new TextEdit('project_id_edit');
$editColumn = new CustomEditColumn('Project Id', 'project_id', $editor, $this->dataset);
$editColumn->SetAllowSetToDefault(true);
$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_type field
//
$editor = new TextEdit('project_type_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Project Type', 'project_type', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for project_name field
//
$editor = new TextAreaEdit('project_name_edit', 50, 8);
$editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_start field
//
$editor = new DateTimeEdit('date_start_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_end field
//
$editor = new DateTimeEdit('date_end_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for year field
//
$editor = new TextEdit('year_edit');
$editor->SetSize(4);
$editor->SetMaxLength(4);
$editColumn = new CustomEditColumn('Year', 'year', $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 Objective field
//
$editor = new TextEdit('objective_edit');
$editColumn = new CustomEditColumn('Objective', 'Objective', $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 priority field
//
$editor = new TextEdit('priority_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Priority', 'priority', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for project_lead field
//
$editor = new TextEdit('project_lead_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Project Lead', 'project_lead', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for approved_budget field
//
$editor = new TextEdit('approved_budget_edit');
$editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for budget_spent field
//
$editor = new TextEdit('budget_spent_edit');
$editColumn = new CustomEditColumn('Budget Spent', 'budget_spent', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
//.........这里部分代码省略.........
示例7: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for first_name field
//
$editor = new TextEdit('first_name_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('First Name', 'first_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 middle_name field
//
$editor = new TextEdit('middle_name_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Middle Name', 'middle_name', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for last_name field
//
$editor = new TextEdit('last_name_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Last Name', 'last_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 party_affiliation field
//
$editor = new TextEdit('party_affiliation_edit');
$editor->SetSize(1);
$editor->SetMaxLength(1);
$editColumn = new CustomEditColumn('Party Affiliation', 'party_affiliation', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for address1 field
//
$editor = new TextEdit('address1_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Address1', 'address1', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for address2 field
//
$editor = new TextEdit('address2_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Address2', 'address2', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for city field
//
$editor = new TextEdit('city_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('City', 'city', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for state field
//
$editor = new TextEdit('state_edit');
$editor->SetSize(2);
$editor->SetMaxLength(2);
$editColumn = new CustomEditColumn('State', 'state', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for zip field
//
$editor = new TextEdit('zip_edit');
$editor->SetSize(5);
$editor->SetMaxLength(5);
$editColumn = new CustomEditColumn('Zip', 'zip', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for phone field
//
$editor = new TextEdit('phone_edit');
$editor->SetSize(15);
$editor->SetMaxLength(15);
//.........这里部分代码省略.........
示例8: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for ofa-numoff field
//
$editor = new TextEdit('ofa-numoff_edit');
$editColumn = new CustomEditColumn('Numero Offerta', 'ofa-numoff', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-codart field
//
$editor = new ComboBox('ofa-codart_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`articoli`');
$field = new IntegerField('id', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('art-codart');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('art-descart');
$lookupDataset->AddField($field, false);
$field = new StringField('art-dessup');
$lookupDataset->AddField($field, false);
$field = new StringField('art-codprod');
$lookupDataset->AddField($field, false);
$field = new StringField('art-codfam');
$lookupDataset->AddField($field, false);
$field = new StringField('unita_misura');
$lookupDataset->AddField($field, false);
$field = new StringField('art-gruppo-merc');
$lookupDataset->AddField($field, false);
$field = new StringField('art-categoria-omogenea');
$lookupDataset->AddField($field, false);
$field = new IntegerField('art-lungsmu');
$lookupDataset->AddField($field, false);
$field = new DateTimeField('datains');
$lookupDataset->AddField($field, false);
$field = new DateTimeField('datamod');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('art-descart', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('Codice articolo', 'ofa-codart', $editor, $this->dataset, 'art-codart', 'art-descart', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-descart field
//
$editor = new TextEdit('ofa-descart_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Ofa-descart', 'ofa-descart', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-lunghezza field
//
$editor = new TextEdit('ofa-lunghezza_edit');
$editColumn = new CustomEditColumn('Lunghezza', 'ofa-lunghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-larghezza field
//
$editor = new TextEdit('ofa-larghezza_edit');
$editColumn = new CustomEditColumn('Ofa-larghezza', 'ofa-larghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-spessore field
//
$editor = new TextEdit('ofa-spessore_edit');
$editColumn = new CustomEditColumn('Ofa-spessore', 'ofa-spessore', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-quantita field
//
$editor = new TextEdit('ofa-quantita_edit');
$editColumn = new CustomEditColumn('Ofa-quantita', 'ofa-quantita', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-przacq-net field
//
$editor = new TextEdit('ofa-przacq-net_edit');
$editColumn = new CustomEditColumn('Ofa-przacq-net', 'ofa-przacq-net', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-przacq-lor field
//
$editor = new TextEdit('ofa-przacq-lor_edit');
//.........这里部分代码省略.........
示例9: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for DEPARTMENT field
//
$editor = new TextEdit('department_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Department', 'DEPARTMENT', $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 LOCATION field
//
$editor = new TextEdit('location_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Location', 'LOCATION', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for PHONE_NO field
//
$editor = new TextEdit('phone_no_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Phone No', 'PHONE_NO', $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);
}
}
示例10: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for programm_id field
//
$editor = new ComboBox('programm_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Project Type', 'programm_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 project_name field
//
$editor = new TextEdit('project_name_edit');
$editor->SetSize(50);
$editor->SetMaxLength(100);
$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', 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 approved_budget field
//
$editor = new TextEdit('approved_budget_edit');
$editor->SetPlaceholder($this->RenderText('currency value without comma'));
$editor->SetPrefix($this->RenderText('$'));
$editor->SetSuffix($this->RenderText('.00'));
$editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $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);
$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'));
$editColumn = new CustomEditColumn('Priority', 'priority', $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 lead field
//
$editor = new ComboBox('lead_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Lead', 'lead', $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);
//
// Edit column for level_of_service field
//
$editor = new ComboBox('level_of_service_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editor->AddValue('Maintain existing Level Of Service', $this->RenderText('Maintain existing Level Of Service'));
$editor->AddValue('Upgrade Level Of Service', $this->RenderText('Upgrade Level Of Service'));
$editor->AddValue('Downgrade Level Of Service', $this->RenderText('Downgrade Level Of Service'));
$editor->AddValue('New Level Of Service/Asset(s)', $this->RenderText('New Level Of Service/Asset(s)'));
$editor->AddValue('Eliminate Level Of Service/Asset(s)', $this->RenderText('Eliminate Level Of Service/Asset(s)'));
$editor->AddValue('One-Time only Project', $this->RenderText('One-Time only Project'));
$editColumn = new CustomEditColumn('Level Of Service', 'level_of_service', $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);
//.........这里部分代码省略.........
示例11: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for IP field
//
$editor = new TextEdit('ip_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('IP', 'IP', $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 NomMachine field
//
$editor = new TextEdit('nommachine_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('NomMachine', 'NomMachine', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for EtatMachine field
//
$editor = new CheckBox('etatmachine_edit');
$editColumn = new CustomEditColumn('EtatMachine', 'EtatMachine', $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 Service1 field
//
$editor = new CheckBox('service1_edit');
$editColumn = new CustomEditColumn('Service1', 'Service1', $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 Service2 field
//
$editor = new CheckBox('service2_edit');
$editColumn = new CustomEditColumn('Service2', 'Service2', $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 Service3 field
//
$editor = new CheckBox('service3_edit');
$editColumn = new CustomEditColumn('Service3', 'Service3', $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
//.........这里部分代码省略.........
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for office_holder_id field
//
$editor = new MultiLevelComboBoxEditor('office_holder_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);
$selectQuery = 'SELECT oh.id, oh.state,
concat(oh.last_name, \', \', oh.first_name, \' \', oh.middle_name) AS fullName
FROM office_holder oh
ORDER BY oh.last_name, oh.first_name';
$insertQuery = array();
$updateQuery = array();
$deleteQuery = array();
$dataset1 = new QueryDataset(new PgConnectionFactory(), GetConnectionOptions(), $selectQuery, $insertQuery, $updateQuery, $deleteQuery, 'officeHolderIDs');
$field = new IntegerField('id');
$dataset1->AddField($field, false);
$field = new StringField('state');
$dataset1->AddField($field, false);
$field = new StringField('fullname');
$dataset1->AddField($field, false);
$dataset1->SetOrderBy('fullname', GetOrderTypeAsSQL(otAscending));
$editor->AddLevel($dataset1, 'id', 'fullname', $this->RenderText('Office Holder Id'), new ForeignKeyInfo('abbr', 'state'));
$editColumn = new MultiLevelLookupEditColumn('Office Holder Id', 'office_holder_id', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for position_name field
//
$editor = new TextEdit('position_name_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Position Name', 'position_name', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for term_start field
//
$editor = new DateTimeEdit('term_start_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Term Start', 'term_start', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for term_end field
//
$editor = new DateTimeEdit('term_end_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Term End', 'term_end', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for filing_deadline field
//
$editor = new DateTimeEdit('filing_deadline_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Filing Deadline', 'filing_deadline', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for next_election field
//
$editor = new DateTimeEdit('next_election_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Next Election', 'next_election', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$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 office_rank field
//
$editor = new TextEdit('office_rank_edit');
$editColumn = new CustomEditColumn('Office Rank', 'office_rank', $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);
}
}
示例13: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for Cliente field
//
$editor = new AutocomleteComboBox('cliente_edit', $this->CreateLinkBuilder());
$editor->SetSize('250px');
$lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`clientes`');
$field = new IntegerField('idClientes', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new IntegerField('Tipo_Documento');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Num_Identificacion');
$lookupDataset->AddField($field, false);
$field = new IntegerField('DV');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Primer_Apellido');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Segundo_Apellido');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Primer_Nombre');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Otros_Nombres');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('RazonSocial');
$lookupDataset->AddField($field, false);
$field = new StringField('Direccion');
$lookupDataset->AddField($field, false);
$field = new StringField('Cod_Dpto');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Cod_Mcipio');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Pais_Domicilio');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Telefono');
$lookupDataset->AddField($field, false);
$field = new StringField('Ciudad');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Contacto');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('TelContacto');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('Email');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('CIUU');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('empresa_id');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('codigo');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('regimen');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('estado');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('RazonSocial', GetOrderTypeAsSQL(otAscending));
$editColumn = new DynamicLookupEditColumn('Cliente', 'Cliente', 'Cliente_RazonSocial', 'insert_Cliente_RazonSocial_search', $editor, $this->dataset, $lookupDataset, 'idClientes', 'RazonSocial', '');
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for Telefono field
//
$editor = new TextEdit('telefono_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Telefono', 'Telefono', $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 Contacto field
//
$editor = new TextEdit('contacto_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Contacto', 'Contacto', $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);
//.........这里部分代码省略.........
示例14: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for lav-codlav field
//
$editor = new TextEdit('lav-codlav_edit');
$editor->SetSize(10);
$editor->SetMaxLength(10);
$editColumn = new CustomEditColumn('Lav-codlav', 'lav-codlav', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lav-descriz field
//
$editor = new TextEdit('lav-descriz_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Lav-descriz', 'lav-descriz', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lav-critcalc field
//
$editor = new TextEdit('lav-critcalc_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Lav-critcalc', 'lav-critcalc', $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);
}
}
示例15: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for cli-codcli field
//
$editor = new TextEdit('cli-codcli_edit');
$editor->SetSize(15);
$editor->SetMaxLength(15);
$editColumn = new CustomEditColumn('Cli-codcli', 'cli-codcli', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for descrizione field
//
$editor = new TextAreaEdit('descrizione_edit', 50, 8);
$editColumn = new CustomEditColumn('Descrizione', 'descrizione', $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);
}
}