Ejemplo n.º 1
0
 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for rpt_id field
     //
     $editor = new TextEdit('rpt_id_edit');
     $editColumn = new CustomEditColumn('Rpt Id', 'rpt_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 rpt_name field
     //
     $editor = new TextEdit('rpt_name_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Rpt Name', 'rpt_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 rpt_title field
     //
     $editor = new TextAreaEdit('rpt_title_edit', 50, 8);
     $editColumn = new CustomEditColumn('Rpt Title', 'rpt_title', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for rpt_cdate field
     //
     $editor = new DateTimeEdit('rpt_cdate_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Rpt Cdate', 'rpt_cdate', $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 rpt_mdate field
     //
     $editor = new DateTimeEdit('rpt_mdate_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Rpt Mdate', 'rpt_mdate', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for rpt_content field
     //
     $editor = new ImageUploader('rpt_content_edit');
     $editor->SetShowImage(false);
     $editColumn = new FileUploadingColumn('Rpt Content', 'rpt_content', $editor, $this->dataset, false, false, 'GE_webreportsGrid_rpt_content_handler_insert');
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for rpt_owner field
     //
     $editor = new TextEdit('rpt_owner_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Rpt Owner', 'rpt_owner', $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 rpt_status field
     //
     $editor = new TextEdit('rpt_status_edit');
     $editor->SetSize(10);
     $editor->SetMaxLength(10);
     $editColumn = new CustomEditColumn('Rpt Status', 'rpt_status', $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 rpt_type field
     //
     $editor = new TextEdit('rpt_type_edit');
     $editor->SetSize(10);
     $editor->SetMaxLength(10);
     $editColumn = new CustomEditColumn('Rpt Type', 'rpt_type', $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);
     }
 }
Ejemplo n.º 2
0
 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for report_style_id field
     //
     $editor = new TextEdit('report_style_id_edit');
     $editColumn = new CustomEditColumn('Report Style Id', 'report_style_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 type field
     //
     $editor = new TextEdit('type_edit');
     $editor->SetSize(6);
     $editor->SetMaxLength(6);
     $editColumn = new CustomEditColumn('Type', 'type', $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 field field
     //
     $editor = new TextEdit('field_edit');
     $editColumn = new CustomEditColumn('Field', 'field', $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 group field
     //
     $editor = new TextEdit('group_edit');
     $editColumn = new CustomEditColumn('Group', 'group', $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 style_str field
     //
     $editor = new ImageUploader('style_str_edit');
     $editor->SetShowImage(false);
     $editColumn = new FileUploadingColumn('Style Str', 'style_str', $editor, $this->dataset, false, false, 'GE_webreport_styleGrid_style_str_handler_insert');
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for uniq field
     //
     $editor = new TextEdit('uniq_edit');
     $editColumn = new CustomEditColumn('Uniq', 'uniq', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for repname field
     //
     $editor = new TextAreaEdit('repname_edit', 50, 8);
     $editColumn = new CustomEditColumn('Repname', 'repname', $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 styletype field
     //
     $editor = new TextEdit('styletype_edit');
     $editor->SetSize(40);
     $editor->SetMaxLength(40);
     $editColumn = new CustomEditColumn('Styletype', 'styletype', $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);
     }
 }
Ejemplo n.º 3
0
 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for FOTO_ID field
     //
     $editor = new TextEdit('foto_id_edit');
     $editColumn = new CustomEditColumn('FOTO ID', 'FOTO_ID', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for RUTA field
     //
     $editor = new ImageUploader('ruta_edit');
     $editor->SetShowImage(false);
     $editColumn = new FileUploadingColumn('RUTA', 'RUTA', $editor, $this->dataset, false, false, 'GE_FOTOGrid_RUTA_handler_insert');
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for USERNAME field
     //
     $editor = new ComboBox('username_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."PERSONA"');
     $field = new StringField('USERNAME');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('ES_ADMIN');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new DateField('NACIMIENTO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('PRIMER_APELLIDO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('SEGUNDO_APELLIDO');
     $lookupDataset->AddField($field, false);
     $field = new StringField('NOMBRE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('GENERO_ID');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('CIUDAD_ID');
     $lookupDataset->AddField($field, false);
     $field = new StringField('SLOGAN');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('EMAIL');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('CLAVE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('ES_ADMIN', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('USERNAME', 'USERNAME', $editor, $this->dataset, 'USERNAME', 'ES_ADMIN', $lookupDataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for TITULO field
     //
     $editor = new TextEdit('titulo_edit');
     $editor->SetSize(40);
     $editor->SetMaxLength(40);
     $editColumn = new CustomEditColumn('TITULO', 'TITULO', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
Ejemplo n.º 4
0
 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for id field
     //
     $editor = new TextEdit('id_edit');
     $editColumn = new CustomEditColumn('Id', '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 sqlname field
     //
     $editor = new TextEdit('sqlname_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Sqlname', 'sqlname', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for sqlcontent field
     //
     $editor = new ImageUploader('sqlcontent_edit');
     $editor->SetShowImage(false);
     $editColumn = new FileUploadingColumn('Sqlcontent', 'sqlcontent', $editor, $this->dataset, false, false, 'GE_webreport_sqlGrid_sqlcontent_handler_insert');
     $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);
     }
 }