protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'public_office_holderGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(false);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetUseModalInserting(true);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddOperationsColumns($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(false);
     $this->SetExportToWordAvailable(false);
     $this->SetExportToXmlAvailable(false);
     $this->SetExportToCsvAvailable(false);
     $this->SetExportToPdfAvailable(false);
     $this->SetPrinterFriendlyAvailable(false);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(false);
     $this->SetFilterRowAvailable(false);
     $this->SetVisualEffectsEnabled(false);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     //
     // View column for photo_link field
     //
     $column = new TextViewColumn('photo_link', 'Photo Link', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for photo_link field
     //
     $editor = new TextAreaEdit('photo_link_edit', 50, 8);
     $editColumn = new CustomEditColumn('Photo Link', 'photo_link', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for photo_link field
     //
     $editor = new TextAreaEdit('photo_link_edit', 50, 8);
     $editColumn = new CustomEditColumn('Photo Link', 'photo_link', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_photo_link_handler_list', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for notes field
     //
     $column = new TextViewColumn('notes', 'Notes', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // 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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // 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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_notes_handler_list', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for photo_link field
     //
     $column = new TextViewColumn('photo_link', 'Photo Link', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_photo_link_handler_view', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for notes field
     //
     $column = new TextViewColumn('notes', 'Notes', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_notes_handler_view', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
Esempio n. 2
0
 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for Cod_dpto field
     //
     $column = new TextViewColumn('Cod_dpto', 'Cod Dpto', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Cod_dpto field
     //
     $editor = new TextEdit('cod_dpto_edit');
     $editColumn = new CustomEditColumn('Cod Dpto', 'Cod_dpto', $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 Cod_dpto field
     //
     $editor = new TextEdit('cod_dpto_edit');
     $editColumn = new CustomEditColumn('Cod Dpto', 'Cod_dpto', $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 Nombre field
     //
     $column = new TextViewColumn('Nombre', 'Nombre', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Nombre field
     //
     $editor = new TextEdit('nombre_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Nombre field
     //
     $editor = new TextEdit('nombre_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
Esempio n. 3
0
 protected function AddFieldColumns(Grid $grid)
 {
     if (GetCurrentUserGrantForDataSource('facturas.facturas_abonos')->HasViewGrant()) {
         //
         // View column for facturas_abonosDetailView0facturas detail
         //
         $column = new DetailColumn(array('idFacturas'), 'detail0facturas', 'facturas_abonosDetailEdit0facturas_handler', 'facturas_abonosDetailView0facturas_handler', $this->dataset, 'Facturas Abonos', $this->RenderText('Facturas Abonos'));
         $grid->AddViewColumn($column);
     }
     //
     // View column for idFacturas field
     //
     $column = new TextViewColumn('idFacturas', 'IdFacturas', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for idFacturas field
     //
     $editor = new TextEdit('idfacturas_edit');
     $editColumn = new CustomEditColumn('IdFacturas', 'idFacturas', $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 idFacturas field
     //
     $editor = new TextEdit('idfacturas_edit');
     $editColumn = new CustomEditColumn('IdFacturas', 'idFacturas', $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 Fecha field
     //
     $column = new TextViewColumn('Fecha', 'Fecha', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Fecha field
     //
     $editor = new TextEdit('fecha_edit');
     $editor->SetSize(20);
     $editor->SetMaxLength(20);
     $editColumn = new CustomEditColumn('Fecha', 'Fecha', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Fecha field
     //
     $editor = new TextEdit('fecha_edit');
     $editor->SetSize(20);
     $editor->SetMaxLength(20);
     $editColumn = new CustomEditColumn('Fecha', 'Fecha', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for OCompra field
     //
     $column = new TextViewColumn('OCompra', 'OCompra', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for OCompra field
     //
     $editor = new TextEdit('ocompra_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('OCompra', 'OCompra', $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 OCompra field
     //
     $editor = new TextEdit('ocompra_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('OCompra', 'OCompra', $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 OSalida field
     //
     $column = new TextViewColumn('OSalida', 'OSalida', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for OSalida field
     //
     $editor = new TextEdit('osalida_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('OSalida', 'OSalida', $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 OSalida field
     //
     $editor = new TextEdit('osalida_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('OSalida', 'OSalida', $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 FormaPago field
     //
     $column = new TextViewColumn('FormaPago', 'FormaPago', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for FormaPago field
     //
     $editor = new TextEdit('formapago_edit');
     $editor->SetSize(20);
     $editor->SetMaxLength(20);
     $editColumn = new CustomEditColumn('FormaPago', 'FormaPago', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for FormaPago field
     //
     $editor = new TextEdit('formapago_edit');
     $editor->SetSize(20);
     $editor->SetMaxLength(20);
     $editColumn = new CustomEditColumn('FormaPago', 'FormaPago', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Subtotal field
     //
     $column = new TextViewColumn('Subtotal', 'Subtotal', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Subtotal field
     //
     $editor = new TextEdit('subtotal_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Subtotal', 'Subtotal', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Subtotal field
     //
     $editor = new TextEdit('subtotal_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Subtotal', 'Subtotal', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for IVA field
     //
     $column = new TextViewColumn('IVA', 'IVA', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for IVA field
     //
     $editor = new TextEdit('iva_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('IVA', 'IVA', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for IVA field
     //
     $editor = new TextEdit('iva_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('IVA', 'IVA', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Descuentos field
     //
     $column = new TextViewColumn('Descuentos', 'Descuentos', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Descuentos field
     //
     $editor = new TextEdit('descuentos_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Descuentos', 'Descuentos', $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 Descuentos field
     //
     $editor = new TextEdit('descuentos_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Descuentos', 'Descuentos', $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 Total field
     //
     $column = new TextViewColumn('Total', 'Total', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Total field
     //
     $editor = new TextEdit('total_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Total', 'Total', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Total field
     //
     $editor = new TextEdit('total_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Total', 'Total', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for SaldoFact field
     //
     $column = new TextViewColumn('SaldoFact', 'SaldoFact', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for SaldoFact field
     //
     $editor = new TextEdit('saldofact_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('SaldoFact', 'SaldoFact', $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 SaldoFact field
     //
     $editor = new TextEdit('saldofact_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('SaldoFact', 'SaldoFact', $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 TotalCostos field
     //
     $column = new TextViewColumn('TotalCostos', 'TotalCostos', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for TotalCostos field
     //
     $editor = new TextEdit('totalcostos_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('TotalCostos', 'TotalCostos', $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 TotalCostos field
     //
     $editor = new TextEdit('totalcostos_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('TotalCostos', 'TotalCostos', $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 Cotizaciones_idCotizaciones field
     //
     $column = new TextViewColumn('Cotizaciones_idCotizaciones', 'Cotizaciones IdCotizaciones', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Cotizaciones_idCotizaciones field
     //
     $editor = new TextEdit('cotizaciones_idcotizaciones_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Cotizaciones IdCotizaciones', 'Cotizaciones_idCotizaciones', $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 Cotizaciones_idCotizaciones field
     //
     $editor = new TextEdit('cotizaciones_idcotizaciones_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Cotizaciones IdCotizaciones', 'Cotizaciones_idCotizaciones', $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 EmpresaPro_idEmpresaPro field
     //
     $column = new TextViewColumn('EmpresaPro_idEmpresaPro', 'EmpresaPro IdEmpresaPro', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for EmpresaPro_idEmpresaPro field
     //
     $editor = new TextEdit('empresapro_idempresapro_edit');
     $editColumn = new CustomEditColumn('EmpresaPro IdEmpresaPro', 'EmpresaPro_idEmpresaPro', $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 EmpresaPro_idEmpresaPro field
     //
     $editor = new TextEdit('empresapro_idempresapro_edit');
     $editColumn = new CustomEditColumn('EmpresaPro IdEmpresaPro', 'EmpresaPro_idEmpresaPro', $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 Usuarios_idUsuarios field
     //
     $column = new TextViewColumn('Usuarios_idUsuarios', 'Usuarios IdUsuarios', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Usuarios_idUsuarios field
     //
     $editor = new TextEdit('usuarios_idusuarios_edit');
     $editColumn = new CustomEditColumn('Usuarios IdUsuarios', 'Usuarios_idUsuarios', $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 Usuarios_idUsuarios field
     //
     $editor = new TextEdit('usuarios_idusuarios_edit');
     $editColumn = new CustomEditColumn('Usuarios IdUsuarios', 'Usuarios_idUsuarios', $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 Clientes_idClientes field
     //
     $column = new TextViewColumn('Clientes_idClientes', 'Clientes IdClientes', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Clientes_idClientes field
     //
     $editor = new TextEdit('clientes_idclientes_edit');
     $editColumn = new CustomEditColumn('Clientes IdClientes', 'Clientes_idClientes', $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 Clientes_idClientes field
     //
     $editor = new TextEdit('clientes_idclientes_edit');
     $editColumn = new CustomEditColumn('Clientes IdClientes', 'Clientes_idClientes', $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 nombre field
     //
     $column = new TextViewColumn('CentroCosto_nombre', 'CentroCosto', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for CentroCosto field
     //
     $editor = new ComboBox('centrocosto_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('CentroCosto', 'CentroCosto', $editor, $this->dataset, 'id', 'nombre', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for CentroCosto field
     //
     $editor = new ComboBox('centrocosto_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('CentroCosto', 'CentroCosto', $editor, $this->dataset, 'id', 'nombre', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
Esempio n. 4
0
 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'empresaGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(true);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     //
     // View column for nombre field
     //
     $column = new TextViewColumn('nombre', 'Nombre', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for nombre field
     //
     $editor = new TextEdit('nombre_edit');
     $editor->SetSize(80);
     $editor->SetMaxLength(80);
     $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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for nombre field
     //
     $editor = new TextEdit('nombre_edit');
     $editor->SetSize(80);
     $editor->SetMaxLength(80);
     $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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'nombre_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for depto field
     //
     $column = new TextViewColumn('depto', 'Depto', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for depto field
     //
     $editor = new TextAreaEdit('depto_edit', 50, 8);
     $editColumn = new CustomEditColumn('Depto', 'depto', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for depto field
     //
     $editor = new TextAreaEdit('depto_edit', 50, 8);
     $editColumn = new CustomEditColumn('Depto', 'depto', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'depto_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for mupio field
     //
     $column = new TextViewColumn('mupio', 'Mupio', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for mupio field
     //
     $editor = new TextAreaEdit('mupio_edit', 50, 8);
     $editColumn = new CustomEditColumn('Mupio', 'mupio', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for mupio field
     //
     $editor = new TextAreaEdit('mupio_edit', 50, 8);
     $editColumn = new CustomEditColumn('Mupio', 'mupio', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'mupio_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for nombre field
     //
     $column = new TextViewColumn('nombre', 'Nombre', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'nombre_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for depto field
     //
     $column = new TextViewColumn('depto', 'Depto', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'depto_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for mupio field
     //
     $column = new TextViewColumn('mupio', 'Mupio', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'mupio_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for id field
     //
     $column = new TextViewColumn('id', 'Id', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for id field
     //
     $editor = new SpinEdit('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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for id field
     //
     $editor = new SpinEdit('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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for state field
     //
     $column = new TextViewColumn('state', 'State', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for state field
     //
     $editor = new TextEdit('state_edit');
     $editColumn = new CustomEditColumn('State', 'state', $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 state field
     //
     $editor = new TextEdit('state_edit');
     $editColumn = new CustomEditColumn('State', 'state', $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 full_name field
     //
     $column = new TextViewColumn('full_name', 'Full Name', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for full_name field
     //
     $editor = new TextEdit('full_name_edit');
     $editColumn = new CustomEditColumn('Full Name', 'full_name', $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 full_name field
     //
     $editor = new TextEdit('full_name_edit');
     $editColumn = new CustomEditColumn('Full Name', 'full_name', $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);
 }
Esempio n. 6
0
 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'carteraGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(true);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_edit_Cliente_RazonSocial_search', 'idClientes', 'RazonSocial', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_insert_Cliente_RazonSocial_search', 'idClientes', 'RazonSocial', null);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Observaciones field
     //
     $column = new TextViewColumn('Observaciones', 'Observaciones', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Observaciones field
     //
     $editor = new TextAreaEdit('observaciones_edit', 50, 8);
     $editColumn = new CustomEditColumn('Observaciones', 'Observaciones', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Observaciones field
     //
     $editor = new TextAreaEdit('observaciones_edit', 50, 8);
     $editColumn = new CustomEditColumn('Observaciones', 'Observaciones', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Observaciones_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Observaciones field
     //
     $column = new TextViewColumn('Observaciones', 'Observaciones', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Observaciones_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_Cliente_RazonSocial_search', 'idClientes', 'RazonSocial', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'insert_Cliente_RazonSocial_search', 'idClientes', 'RazonSocial', null);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
Esempio n. 7
0
 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for name field
     //
     $column = new TextViewColumn('state_name', 'State', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for state field
     //
     $editor = new ComboBox('state_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."state"');
     $field = new StringField('abbr');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('name');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('State', 'state', $editor, $this->dataset, 'abbr', 'name', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for state field
     //
     $editor = new ComboBox('state_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."state"');
     $field = new StringField('abbr');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('name');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('State', 'state', $editor, $this->dataset, 'abbr', 'name', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for name field
     //
     $column = new TextViewColumn('name', 'District Name', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('District Name', 'name', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('District Name', 'name', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for name field
     //
     $column = new TextViewColumn('level_id_name', 'Level of Government', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for level_id field
     //
     $editor = new ComboBox('level_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."level"');
     $field = new StringField('id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('name');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('rank');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Level of Government', 'level_id', $editor, $this->dataset, 'id', 'name', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for level_id field
     //
     $editor = new ComboBox('level_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."level"');
     $field = new StringField('id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('name');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('rank');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Level of Government', 'level_id', $editor, $this->dataset, 'id', 'name', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for name field
     //
     $column = new TextViewColumn('election_div_id_name', 'Election Division', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for election_div_id field
     //
     $editor = new MultiLevelComboBoxEditor('election_div_id_edit', $this->CreateLinkBuilder());
     $dataset0 = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."state"');
     $field = new StringField('abbr');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, true);
     $field = new StringField('name');
     $dataset0->AddField($field, false);
     $editor->AddLevel($dataset0, 'abbr', 'name', $this->RenderText('State'), null);
     $dataset1 = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."election_div"');
     $field = new IntegerField('id');
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, true);
     $field = new StringField('name');
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_addr1');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_addr2');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_city');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_state');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_zip');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_addr1');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_addr2');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_city');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_state');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_zip');
     $dataset1->AddField($field, false);
     $field = new StringField('phone');
     $dataset1->AddField($field, false);
     $field = new StringField('fax');
     $dataset1->AddField($field, false);
     $field = new StringField('website');
     $dataset1->AddField($field, false);
     $field = new StringField('notes');
     $dataset1->AddField($field, false);
     $dataset1->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editor->AddLevel($dataset1, 'id', 'name', $this->RenderText('Election Division'), new ForeignKeyInfo('abbr', 'phys_addr_state'));
     $editColumn = new MultiLevelLookupEditColumn('Election Division', 'election_div_id', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for election_div_id field
     //
     $editor = new MultiLevelComboBoxEditor('election_div_id_edit', $this->CreateLinkBuilder());
     $dataset0 = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."state"');
     $field = new StringField('abbr');
     $field->SetIsNotNull(true);
     $dataset0->AddField($field, true);
     $field = new StringField('name');
     $dataset0->AddField($field, false);
     $editor->AddLevel($dataset0, 'abbr', 'name', $this->RenderText('State'), null);
     $dataset1 = new TableDataset(new PgConnectionFactory(), GetConnectionOptions(), '"public"."election_div"');
     $field = new IntegerField('id');
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, true);
     $field = new StringField('name');
     $field->SetIsNotNull(true);
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_addr1');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_addr2');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_city');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_state');
     $dataset1->AddField($field, false);
     $field = new StringField('phys_addr_zip');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_addr1');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_addr2');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_city');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_state');
     $dataset1->AddField($field, false);
     $field = new StringField('mail_addr_zip');
     $dataset1->AddField($field, false);
     $field = new StringField('phone');
     $dataset1->AddField($field, false);
     $field = new StringField('fax');
     $dataset1->AddField($field, false);
     $field = new StringField('website');
     $dataset1->AddField($field, false);
     $field = new StringField('notes');
     $dataset1->AddField($field, false);
     $dataset1->SetOrderBy('name', GetOrderTypeAsSQL(otAscending));
     $editor->AddLevel($dataset1, 'id', 'name', $this->RenderText('Election Division'), new ForeignKeyInfo('abbr', 'phys_addr_state'));
     $editColumn = new MultiLevelLookupEditColumn('Election Division', 'election_div_id', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
Esempio n. 8
0
 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'clientesGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(true);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     //
     // View column for RazonSocial field
     //
     $column = new TextViewColumn('RazonSocial', 'RazonSocial', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for RazonSocial field
     //
     $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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for RazonSocial field
     //
     $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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'RazonSocial_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_edit_Cod_Dpto_Nombre_search', 'Cod_dpto', 'Nombre', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_insert_Cod_Dpto_Nombre_search', 'Cod_dpto', 'Nombre', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_edit_Pais_Domicilio_Pais_search', 'Codigo', 'Pais', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'inline_insert_Pais_Domicilio_Pais_search', 'Codigo', 'Pais', null);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Telefono field
     //
     $column = new TextViewColumn('Telefono', 'Telefono', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Telefono field
     //
     $editor = new TextEdit('telefono_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Telefono field
     //
     $editor = new TextEdit('telefono_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Telefono_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Contacto field
     //
     $column = new TextViewColumn('Contacto', 'Contacto', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Contacto field
     //
     $editor = new TextEdit('contacto_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Contacto', 'Contacto', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Contacto field
     //
     $editor = new TextEdit('contacto_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Contacto', 'Contacto', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Contacto_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for RazonSocial field
     //
     $column = new TextViewColumn('RazonSocial', 'RazonSocial', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'RazonSocial_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Telefono field
     //
     $column = new TextViewColumn('Telefono', 'Telefono', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Telefono_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Contacto field
     //
     $column = new TextViewColumn('Contacto', 'Contacto', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Contacto_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_Cod_Dpto_Nombre_search', 'Cod_dpto', 'Nombre', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_Pais_Domicilio_Pais_search', 'Codigo', 'Pais', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'insert_Cod_Dpto_Nombre_search', 'Cod_dpto', 'Nombre', null);
     GetApplication()->RegisterHTTPHandler($handler);
     $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));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
     $handler = new DynamicSearchHandler($lookupDataset, $this, 'insert_Pais_Domicilio_Pais_search', 'Codigo', 'Pais', null);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
Esempio n. 9
0
 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'hometextGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(false);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(true);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddOperationsColumns($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(false);
     $this->SetExportToWordAvailable(false);
     $this->SetExportToXmlAvailable(false);
     $this->SetExportToCsvAvailable(false);
     $this->SetExportToPdfAvailable(false);
     $this->SetPrinterFriendlyAvailable(false);
     $this->SetSimpleSearchAvailable(false);
     $this->SetAdvancedSearchAvailable(false);
     $this->SetFilterRowAvailable(false);
     $this->SetVisualEffectsEnabled(false);
     $this->SetShowTopPageNavigator(false);
     $this->SetShowBottomPageNavigator(false);
     //
     // Http Handlers
     //
     //
     // View column for text field
     //
     $column = new TextViewColumn('text', 'Text', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for text field
     //
     $editor = new HtmlWysiwygEditor('text_edit');
     $editor->SetAllowColorControls(true);
     $editColumn = new CustomEditColumn('Text', 'text', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for text field
     //
     $editor = new HtmlWysiwygEditor('text_edit');
     $editor->SetAllowColorControls(true);
     $editColumn = new CustomEditColumn('Text', 'text', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column = new DivTagViewColumnDecorator($column);
     $column->Align = 'left';
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'text_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for text field
     //
     $column = new TextViewColumn('text', 'Text', $this->dataset);
     $column->SetOrderable(true);
     $column = new DivTagViewColumnDecorator($column);
     $column->Align = 'left';
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'text_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for id field
     //
     $column = new TextViewColumn('id', 'Id', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'id_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
Esempio n. 10
0
 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for idKardexMercancias field
     //
     $column = new TextViewColumn('idKardexMercancias', 'IdKardexMercancias', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Fecha field
     //
     $column = new TextViewColumn('Fecha', 'Fecha', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Fecha field
     //
     $editor = new TextEdit('fecha_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Fecha', 'Fecha', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Fecha field
     //
     $editor = new TextEdit('fecha_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Fecha', 'Fecha', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Movimiento field
     //
     $column = new TextViewColumn('Movimiento', 'Movimiento', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Movimiento field
     //
     $editor = new TextEdit('movimiento_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Movimiento', 'Movimiento', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Movimiento field
     //
     $editor = new TextEdit('movimiento_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Movimiento', 'Movimiento', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Detalle field
     //
     $column = new TextViewColumn('Detalle', 'Detalle', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Detalle field
     //
     $editor = new TextEdit('detalle_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Detalle', 'Detalle', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Detalle field
     //
     $editor = new TextEdit('detalle_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Detalle', 'Detalle', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for idDocumento field
     //
     $column = new TextViewColumn('idDocumento', 'IdDocumento', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for idDocumento field
     //
     $editor = new TextEdit('iddocumento_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('IdDocumento', 'idDocumento', $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 idDocumento field
     //
     $editor = new TextEdit('iddocumento_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('IdDocumento', 'idDocumento', $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 Cantidad field
     //
     $column = new TextViewColumn('Cantidad', 'Cantidad', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for Cantidad field
     //
     $editor = new TextEdit('cantidad_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Cantidad', 'Cantidad', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for Cantidad field
     //
     $editor = new TextEdit('cantidad_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('Cantidad', 'Cantidad', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for ValorUnitario field
     //
     $column = new TextViewColumn('ValorUnitario', 'ValorUnitario', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for ValorUnitario field
     //
     $editor = new TextEdit('valorunitario_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('ValorUnitario', 'ValorUnitario', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for ValorUnitario field
     //
     $editor = new TextEdit('valorunitario_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('ValorUnitario', 'ValorUnitario', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for ValorTotal field
     //
     $column = new TextViewColumn('ValorTotal', 'ValorTotal', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for ValorTotal field
     //
     $editor = new TextEdit('valortotal_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('ValorTotal', 'ValorTotal', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for ValorTotal field
     //
     $editor = new TextEdit('valortotal_edit');
     $editor->SetSize(45);
     $editor->SetMaxLength(45);
     $editColumn = new CustomEditColumn('ValorTotal', 'ValorTotal', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for ProductosVenta_idProductosVenta field
     //
     $column = new TextViewColumn('ProductosVenta_idProductosVenta', 'ProductosVenta IdProductosVenta', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for ProductosVenta_idProductosVenta field
     //
     $editor = new TextEdit('productosventa_idproductosventa_edit');
     $editColumn = new CustomEditColumn('ProductosVenta IdProductosVenta', 'ProductosVenta_idProductosVenta', $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 ProductosVenta_idProductosVenta field
     //
     $editor = new TextEdit('productosventa_idproductosventa_edit');
     $editColumn = new CustomEditColumn('ProductosVenta IdProductosVenta', 'ProductosVenta_idProductosVenta', $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);
 }
Esempio n. 11
0
 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'imvGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(true);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     $pageView = new kardexmercanciasDetailView0imvPage($this, 'Kardexmercancias', 'Kardexmercancias', array('ProductosVenta_idProductosVenta'), GetCurrentUserGrantForDataSource('imv.'), 'UTF-8', 20, 'kardexmercanciasDetailEdit0imv_handler');
     $pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('imv.'));
     $handler = new PageHTTPHandler('kardexmercanciasDetailView0imv_handler', $pageView);
     GetApplication()->RegisterHTTPHandler($handler);
     $pageEdit = new kardexmercanciasDetailEdit0imvPage($this, array('ProductosVenta_idProductosVenta'), array('id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForkardexmercanciasDetailEdit0imvGrid(), $this->dataset, GetCurrentUserGrantForDataSource('imv.'), 'UTF-8');
     $pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('imv.'));
     $pageEdit->SetShortCaption('Kardexmercancias');
     $pageEdit->SetHeader(GetPagesHeader());
     $pageEdit->SetFooter(GetPagesFooter());
     $pageEdit->SetCaption('Kardexmercancias');
     $pageEdit->SetHttpHandlerName('kardexmercanciasDetailEdit0imv_handler');
     $handler = new PageHTTPHandler('kardexmercanciasDetailEdit0imv_handler', $pageEdit);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for cod_cups field
     //
     $column = new TextViewColumn('cod_cups', 'Cod Cups', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for cod_cups field
     //
     $editor = new TextEdit('cod_cups_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Cod Cups', 'cod_cups', $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 cod_cups field
     //
     $editor = new TextEdit('cod_cups_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Cod Cups', 'cod_cups', $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> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'cod_cups_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for cod_admin field
     //
     $column = new TextViewColumn('cod_admin', 'Cod Admin', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for cod_admin field
     //
     $editor = new TextEdit('cod_admin_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Cod Admin', 'cod_admin', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for cod_admin field
     //
     $editor = new TextEdit('cod_admin_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Cod Admin', 'cod_admin', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'cod_admin_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for cums field
     //
     $column = new TextViewColumn('cums', 'Cums', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for cums field
     //
     $editor = new TextEdit('cums_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Cums', 'cums', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for cums field
     //
     $editor = new TextEdit('cums_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Cums', 'cums', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'cums_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for nombre field
     //
     $column = new TextViewColumn('nombre', 'Nombre', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // 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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // 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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'nombre_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for tipo_imv field
     //
     $column = new TextViewColumn('tipo_imv', 'Tipo Imv', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for tipo_imv field
     //
     $editor = new TextEdit('tipo_imv_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Tipo Imv', 'tipo_imv', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for tipo_imv field
     //
     $editor = new TextEdit('tipo_imv_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Tipo Imv', 'tipo_imv', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'tipo_imv_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for uni_medida field
     //
     $column = new TextViewColumn('uni_medida', 'Uni Medida', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for uni_medida field
     //
     $editor = new TextEdit('uni_medida_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Uni Medida', 'uni_medida', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for uni_medida field
     //
     $editor = new TextEdit('uni_medida_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Uni Medida', 'uni_medida', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'uni_medida_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for tipo_med field
     //
     $column = new TextViewColumn('tipo_med', 'Tipo Med', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for tipo_med field
     //
     $editor = new TextEdit('tipo_med_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Tipo Med', 'tipo_med', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for tipo_med field
     //
     $editor = new TextEdit('tipo_med_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Tipo Med', 'tipo_med', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'tipo_med_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for cod_cups field
     //
     $column = new TextViewColumn('cod_cups', 'Cod Cups', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'cod_cups_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for cod_admin field
     //
     $column = new TextViewColumn('cod_admin', 'Cod Admin', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'cod_admin_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for cums field
     //
     $column = new TextViewColumn('cums', 'Cums', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'cums_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for nombre field
     //
     $column = new TextViewColumn('nombre', 'Nombre', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'nombre_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for tipo_imv field
     //
     $column = new TextViewColumn('tipo_imv', 'Tipo Imv', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'tipo_imv_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for uni_medida field
     //
     $column = new TextViewColumn('uni_medida', 'Uni Medida', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'uni_medida_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for tipo_med field
     //
     $column = new TextViewColumn('tipo_med', 'Tipo Med', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'tipo_med_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
Esempio n. 12
0
 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'activosGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(true);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     $pageView = new act_movimientosDetailView0activosPage($this, 'Act Movimientos', 'Act Movimientos', array('idActivo'), GetCurrentUserGrantForDataSource('activos.act_movimientos'), 'UTF-8', 20, 'act_movimientosDetailEdit0activos_handler');
     $pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('activos.act_movimientos'));
     $handler = new PageHTTPHandler('act_movimientosDetailView0activos_handler', $pageView);
     GetApplication()->RegisterHTTPHandler($handler);
     $pageEdit = new act_movimientosDetailEdit0activosPage($this, array('idActivo'), array('idActivos'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForact_movimientosDetailEdit0activosGrid(), $this->dataset, GetCurrentUserGrantForDataSource('activos.act_movimientos'), 'UTF-8');
     $pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('activos.act_movimientos'));
     $pageEdit->SetShortCaption('Act Movimientos');
     $pageEdit->SetHeader(GetPagesHeader());
     $pageEdit->SetFooter(GetPagesFooter());
     $pageEdit->SetCaption('Act Movimientos');
     $pageEdit->SetHttpHandlerName('act_movimientosDetailEdit0activos_handler');
     $handler = new PageHTTPHandler('act_movimientosDetailEdit0activos_handler', $pageEdit);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for NombreAct field
     //
     $column = new TextViewColumn('NombreAct', 'NombreAct', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // 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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // 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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'NombreAct_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Marca field
     //
     $column = new TextViewColumn('Marca', 'Marca', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // 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);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // 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);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Marca_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for NombreAct field
     //
     $column = new TextViewColumn('NombreAct', 'NombreAct', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'NombreAct_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for Marca field
     //
     $column = new TextViewColumn('Marca', 'Marca', $this->dataset);
     $column->SetOrderable(true);
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'Marca_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     return $result;
 }
 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');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Assigned');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Task', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), 'assigned_to=%CURRENT_USER_ID%'));
     $editColumn = new LookUpEditColumn('Project & Task', 'task_id', $editor, $this->dataset, 'task_id', 'Task', $lookupDataset);
     $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 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');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Assigned');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Task', GetOrderTypeAsSQL(otAscending));
     $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), 'assigned_to=%CURRENT_USER_ID%'));
     $editColumn = new LookUpEditColumn('Project & Task', 'task_id', $editor, $this->dataset, 'task_id', 'Task', $lookupDataset);
     $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 hours field
     //
     $column = new TextViewColumn('hours', 'Hours', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for hours field
     //
     $editor = new TextEdit('hours_edit');
     $editColumn = new CustomEditColumn('Hours', 'hours', $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 hours field
     //
     $editor = new TextEdit('hours_edit');
     $editColumn = new CustomEditColumn('Hours', 'hours', $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 notes field
     //
     $column = new TextViewColumn('notes', 'Notes', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for notes field
     //
     $editor = new TextEdit('notes_edit');
     $editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for notes field
     //
     $editor = new TextEdit('notes_edit');
     $editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }