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


PHP CustomEditColumn::SetInsertDefaultValue方法代码示例

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


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

示例1: AddInsertColumns

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

示例2: 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');
     $editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $validator = new CustomRegExpValidator('^[A-Za-z0-9 ()&]+[-]*[A-Za-z0-9 ()&]*$', StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RegExpValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_start field
     //
     $editor = new DateTimeEdit('date_start_edit', false, 'Y-m-d', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_end field
     //
     $editor = new DateTimeEdit('date_end_edit', true, 'Y-m-d', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for year field
     //
     $editor = new TextEdit('year_edit');
     $editColumn = new CustomEditColumn('Year', 'year', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('2016'));
     $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('Project 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 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 budget_spent field
     //
     $editor = new TextEdit('budget_spent_edit');
//.........这里部分代码省略.........
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:101,代码来源:project.php

示例3: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for lis-codart field
     //
     $editor = new AutocomleteComboBox('lis-codart_edit', $this->CreateLinkBuilder());
     $editor->SetSize('350px');
     $editor->setAllowClear(true);
     $editor->setMinimumInputLength(0);
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`');
     $field = new StringField('art-codart');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('descrizione');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending));
     $editColumn = new DynamicLookupEditColumn('Codice Articolo', 'lis-codart', 'lis-codart_descrizione', 'insert_lis-codart_descrizione_search', $editor, $this->dataset, $lookupDataset, 'art-codart', 'descrizione', '');
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lisdesc field
     //
     $editor = new TextEdit('lisdesc_edit');
     $editor->SetSize(100);
     $editColumn = new CustomEditColumn('Descrizione', 'lisdesc', $editor, $this->dataset);
     $editColumn->SetReadOnly(true);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lis-unimis field
     //
     $editor = new ComboBox('lis-unimis_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editor->AddValue('N', $this->RenderText('Nessuna'));
     $editor->AddValue('LT', $this->RenderText('Litri'));
     $editor->AddValue('KG', $this->RenderText('Chili'));
     $editor->AddValue('CF', $this->RenderText('Confezione'));
     $editor->AddValue('MC', $this->RenderText('Metri cubi'));
     $editor->AddValue('MT', $this->RenderText('Metri'));
     $editColumn = new CustomEditColumn('Unità misura', 'lis-unimis', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lis-przacq field
     //
     $editor = new TextEdit('lis-przacq_edit');
     $editColumn = new CustomEditColumn('Prezzo acquisto', 'lis-przacq', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('0'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lis-moltipl field
     //
     $editor = new TextEdit('lis-moltipl_edit');
     $editColumn = new CustomEditColumn('Moltiplicatore', 'lis-moltipl', $editor, $this->dataset);
     $editColumn->SetReadOnly(true);
     $editColumn->SetInsertDefaultValue($this->RenderText('5'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lis-oneriacc field
     //
     $editor = new TextEdit('lis-oneriacc_edit');
     $editor->SetSuffix($this->RenderText('%'));
     $editColumn = new CustomEditColumn('Oneri e accessori', 'lis-oneriacc', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('0'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lis-scarto field
     //
     $editor = new TextEdit('lis-scarto_edit');
     $editor->SetSuffix($this->RenderText('%'));
     $editColumn = new CustomEditColumn('Scarto', 'lis-scarto', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('0'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lis-dataini field
     //
     $editor = new DateTimeEdit('lis-dataini_edit', false, 'd-m-Y', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Data inizio decorrenza', 'lis-dataini', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATETIME%'));
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for lis-datafin field
//.........这里部分代码省略.........
开发者ID:eroncalli,项目名称:atig,代码行数:101,代码来源:listino_articoli.php

示例4: AddInsertColumns


//.........这里部分代码省略.........
     $editor = new TextEdit('razonsocial_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('RazonSocial', 'RazonSocial', $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 Direccion field
     //
     $editor = new TextEdit('direccion_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Direccion', 'Direccion', $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 Cod_Dpto field
     //
     $editor = new AutocomleteComboBox('cod_dpto_edit', $this->CreateLinkBuilder());
     $editor->SetSize('250px');
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`cod_departamentos`');
     $field = new IntegerField('Cod_dpto');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Nombre');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Nombre', GetOrderTypeAsSQL(otAscending));
     $editColumn = new DynamicLookupEditColumn('Cod Dpto', 'Cod_Dpto', 'Cod_Dpto_Nombre', 'insert_Cod_Dpto_Nombre_search', $editor, $this->dataset, $lookupDataset, 'Cod_dpto', 'Nombre', '');
     $editColumn->SetInsertDefaultValue($this->RenderText('76'));
     $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 Cod_Mcipio field
     //
     $editor = new TextEdit('cod_mcipio_edit');
     $editor->SetSize(10);
     $editor->SetMaxLength(10);
     $editColumn = new CustomEditColumn('Cod Mcipio', 'Cod_Mcipio', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('111'));
     $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 Pais_Domicilio field
     //
     $editor = new AutocomleteComboBox('pais_domicilio_edit', $this->CreateLinkBuilder());
     $editor->SetSize('250px');
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`cod_paises`');
     $field = new IntegerField('Codigo');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Pais');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Pais', GetOrderTypeAsSQL(otAscending));
     $editColumn = new DynamicLookupEditColumn('Pais Domicilio', 'Pais_Domicilio', 'Pais_Domicilio_Pais', 'insert_Pais_Domicilio_Pais_search', $editor, $this->dataset, $lookupDataset, 'Codigo', 'Pais', '');
     $editColumn->SetInsertDefaultValue($this->RenderText('169'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
开发者ID:Kenovix,项目名称:san-miguel,代码行数:67,代码来源:clientes.php

示例5: 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);
     }
 }
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:85,代码来源:program.php

示例6: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for project_id field
     //
     $editor = new ComboBox('project_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editColumn = new CustomEditColumn('Project', 'project_id', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for task_name field
     //
     $editor = new ComboBox('task_name_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editColumn = new CustomEditColumn('Name', 'task_name', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for notes field
     //
     $editor = new TextAreaEdit('notes_edit', 50, 8);
     $editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for hrs field
     //
     $editor = new SpinEdit('hrs_edit');
     $editColumn = new CustomEditColumn('Allocated Hours', 'hrs', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('21'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for assigned_to field
     //
     $editor = new ComboBox('assigned_to_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editColumn = new CustomEditColumn('Assigned To', 'assigned_to', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_ID%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_start field
     //
     $editor = new DateTimeEdit('date_start_edit', false, 'Y-m-d', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_end field
     //
     $editor = new DateTimeEdit('date_end_edit', true, 'Y-m-d', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:78,代码来源:task.php

示例7: 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'));
     $editColumn = new CustomEditColumn('Lead', 'lead', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_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);
     }
 }
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:58,代码来源:program.php

示例8: AddInsertColumns

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

示例9: AddInsertColumns


//.........这里部分代码省略.........
     $editor = new TextEdit('nombrecuenta_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('NombreCuenta', 'NombreCuenta', $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 Detalle field
     //
     $editor = new TextEdit('detalle_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Detalle', 'Detalle', $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 Debito field
     //
     $editor = new TextEdit('debito_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Debito', 'Debito', $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 Credito field
     //
     $editor = new TextEdit('credito_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Credito', 'Credito', $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 Neto field
     //
     $editor = new TextEdit('neto_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Neto', 'Neto', $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 Mayor field
     //
     $editor = new ComboBox('mayor_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editor->AddValue('NO', $this->RenderText('NO'));
     $editor->AddValue('SI', $this->RenderText('SI'));
     $editColumn = new CustomEditColumn('Mayor', 'Mayor', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $editColumn->SetInsertDefaultValue($this->RenderText('NO'));
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for servicio_id field
     //
     $editor = new ComboBox('servicio_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`servicio`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('empresa_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('nombre');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('estado');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('nombre', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Servicio Id', 'servicio_id', $editor, $this->dataset, 'id', 'nombre', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for empresa_id field
     //
     $editor = new TextEdit('empresa_id_edit');
     $editColumn = new CustomEditColumn('Empresa Id', 'empresa_id', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:Kenovix,项目名称:san-miguel,代码行数:101,代码来源:librodiario.php

示例10: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for sco-codcli field
     //
     $editor = new AutocomleteComboBox('sco-codcli_edit', $this->CreateLinkBuilder());
     $editor->SetSize('250px');
     $editor->setAllowClear(true);
     $editor->setMinimumInputLength(0);
     $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 DynamicLookupEditColumn('Codice cliente', 'sco-codcli', 'sco-codcli_cli-ragsoc', 'insert_sco-codcli_cli-ragsoc_search', $editor, $this->dataset, $lookupDataset, 'cli-codcli', 'cli-ragsoc', '');
     $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 sco-codart field
     //
     $editor = new AutocomleteComboBox('sco-codart_edit', $this->CreateLinkBuilder());
     $editor->SetSize('250px');
     $editor->setAllowClear(true);
     $editor->setMinimumInputLength(0);
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`');
     $field = new StringField('art-codart');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('descrizione');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending));
     $editColumn = new DynamicLookupEditColumn('Codice articolo', 'sco-codart', 'sco-codart_descrizione', 'insert_sco-codart_descrizione_search', $editor, $this->dataset, $lookupDataset, 'art-codart', 'descrizione', '');
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for sco-codvoc field
     //
     $editor = new ComboBox('sco-codvoc_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editColumn = new CustomEditColumn('Codice tipo voce', 'sco-codvoc', $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 sco-sconto field
     //
     $editor = new TextEdit('sco-sconto_edit');
     $editColumn = new CustomEditColumn('Sconto', 'sco-sconto', $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);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:eroncalli,项目名称:atig,代码行数:79,代码来源:scontistica_clienti.php

示例11: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for project_id field
     //
     $editor = new ComboBox('project_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`project`');
     $field = new IntegerField('project_id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new IntegerField('programm_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('project_name');
     $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('approved_budget');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('priority');
     $lookupDataset->AddField($field, false);
     $field = new StringField('lead');
     $lookupDataset->AddField($field, false);
     $field = new StringField('level_of_service');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('multi_year');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('public_engagement');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('year');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('approved');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('progress');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('staff_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('dept_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('budget_spent');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('admin_flag');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('project_name', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), '%CURRENT_USER_ID%  = 1  OR project.lead=%CURRENT_USER_ID%'));
     $editColumn = new LookUpEditColumn('Project', 'project_id', $editor, $this->dataset, 'project_id', 'project_name', $lookupDataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for task_name field
     //
     $editor = new AutocomleteComboBox('task_name_edit', $this->CreateLinkBuilder());
     $editor->SetSize('250px');
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task_names`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Name');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new DynamicLookupEditColumn('Name', 'task_name', 'task_name_Name', 'insert_task_name_Name_search', $editor, $this->dataset, $lookupDataset, 'Name', 'Name', '');
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for notes field
     //
     $editor = new TextAreaEdit('notes_edit', 50, 8);
     $editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for hrs field
     //
     $editor = new SpinEdit('hrs_edit');
     $editColumn = new CustomEditColumn('Allocated Hours', 'hrs', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('21'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:task.php

示例12: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Name', 'name', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_NAME%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for task_id field
     //
     $editor = new MultiLevelComboBoxEditor('task_id_edit', $this->CreateLinkBuilder());
     $dataset0 = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`project`');
     $field = new IntegerField('project_id', null, null, true);
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, true);
     $field = new IntegerField('programm_id');
     $dataset0->AddField($field, false);
     $field = new StringField('project_name');
     $dataset0->AddField($field, false);
     $field = new DateField('date_start');
     $dataset0->AddField($field, false);
     $field = new DateField('date_end');
     $dataset0->AddField($field, false);
     $field = new IntegerField('approved_budget');
     $dataset0->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new StringField('priority');
     $dataset0->AddField($field, false);
     $field = new StringField('lead');
     $dataset0->AddField($field, false);
     $field = new StringField('level_of_service');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new StringField('multi_year');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new StringField('public_engagement');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new StringField('year');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new StringField('approved');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new StringField('progress');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new IntegerField('staff_id');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new IntegerField('dept_id');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new IntegerField('budget_spent');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $field = new IntegerField('admin_flag');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, false);
     $editor->AddLevel($dataset0, 'project_id', 'project_name', $this->RenderText('Project'), null);
     $dataset1 = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task`');
     $field = new IntegerField('task_id', null, null, true);
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, true);
     $field = new IntegerField('project_id');
     $dataset1->AddField($field, false);
     $field = new StringField('assigned_to');
     $dataset1->AddField($field, false);
     $field = new DateField('date_start');
     $dataset1->AddField($field, false);
     $field = new DateField('date_end');
     $dataset1->AddField($field, false);
     $field = new StringField('task_name');
     $dataset1->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, false);
     $field = new IntegerField('hrs');
     $dataset1->AddField($field, false);
     $field = new StringField('wo');
     $dataset1->AddField($field, false);
     $field = new IntegerField('staff_id');
     $dataset1->AddField($field, false);
     $dataset1->SetOrderBy('task_name', GetOrderTypeAsSQL(otAscending));
     $editor->AddLevel($dataset1, 'task_id', 'task_name', $this->RenderText('Task'), new ForeignKeyInfo('project_id', 'project_id'));
     $editColumn = new MultiLevelLookupEditColumn('Task', 'task_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);
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:timesheet.php

示例13: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for Referencia field
     //
     $editor = new TextEdit('referencia_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Referencia', 'Referencia', $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 NombreAct field
     //
     $editor = new TextAreaEdit('nombreact_edit', 50, 8);
     $editColumn = new CustomEditColumn('NombreAct', 'NombreAct', $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 Marca field
     //
     $editor = new TextEdit('marca_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Marca', 'Marca', $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 Serie field
     //
     $editor = new TextEdit('serie_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Serie', 'Serie', $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 ValorEstimado field
     //
     $editor = new TextEdit('valorestimado_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('ValorEstimado', 'ValorEstimado', $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 Bodega field
     //
     $editor = new ComboBox('bodega_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`bodega`');
     $field = new IntegerField('idBodega', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Nombre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Direccion');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Ciudad');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Telefono');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Nombre', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Bodega', 'Bodega', $editor, $this->dataset, 'idBodega', 'Nombre', $lookupDataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('1'));
     $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 CuentaPUC field
     //
     $editor = new TextEdit('cuentapuc_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('CuentaPUC', 'CuentaPUC', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('1520'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:Kenovix,项目名称:san-miguel,代码行数:98,代码来源:activos.php

示例14: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for CuentaPUC field
     //
     $editor = new TextEdit('cuentapuc_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('CuentaPUC', 'CuentaPUC', $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 TextAreaEdit('nombre_edit', 50, 8);
     $editColumn = new CustomEditColumn('Nombre', 'Nombre', $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 ClaseCuenta field
     //
     $editor = new ComboBox('clasecuenta_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $editor->AddValue('ACTIVOS', $this->RenderText('ACTIVOS'));
     $editor->AddValue('PASIVOS', $this->RenderText('PASIVOS'));
     $editColumn = new CustomEditColumn('ClaseCuenta', 'ClaseCuenta', $editor, $this->dataset);
     $editColumn->SetInsertDefaultValue($this->RenderText('ACTIVOS'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:Kenovix,项目名称:san-miguel,代码行数:42,代码来源:cuentasfrecuentes.php

示例15: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for name field
     //
     $column = new TextViewColumn('name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editColumn = new CustomEditColumn('Name', 'name', $editor, $this->dataset);
     $editColumn->setVisible(false);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editColumn = new CustomEditColumn('Name', 'name', $editor, $this->dataset);
     $editColumn->setVisible(false);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_NAME%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date field
     //
     $column = new DateTimeViewColumn('date', 'Date', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for date field
     //
     $editor = new DateTimeEdit('date_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date', 'date', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for date field
     //
     $editor = new DateTimeEdit('date_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date', 'date', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Task field
     //
     $column = new TextViewColumn('task_id_Task', 'Project & Task', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for task_id field
     //
     $editor = new ComboBox('task_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`taskview`');
     $field = new IntegerField('task_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('project_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('assigned_to');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_start');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_end');
     $lookupDataset->AddField($field, false);
     $field = new StringField('task_name');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('hrs');
     $lookupDataset->AddField($field, false);
     $field = new StringField('wo');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('staff_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Task');
//.........这里部分代码省略.........
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:101,代码来源:multiple_time_entry.php


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