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


PHP Grid::SetTotal方法代码示例

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


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

示例1: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for name field
     //
     $column = new TextViewColumn('name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date field
     //
     $column = new DateTimeViewColumn('date', 'Timesheet Date', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for task_name field
     //
     $column = new TextViewColumn('task_name', 'Task Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for project_name field
     //
     $column = new TextViewColumn('project_name', 'Project Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for pay_period_number field
     //
     $column = new TextViewColumn('pay_period_number', 'Pay Period ', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for hours field
     //
     $column = new TextViewColumn('hours', 'Hours', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for position field
     //
     $column = new TextViewColumn('position', 'Position', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for emp_number field
     //
     $column = new TextViewColumn('emp_number', 'Emp Number', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:69,代码来源:View_Pay_Period.php

示例2: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     if (GetCurrentUserGrantForDataSource('project.task')->HasViewGrant()) {
         //
         // View column for taskDetailView0project detail
         //
         $column = new DetailColumn(array('project_id'), 'detail0project', 'taskDetailEdit0project_handler', 'taskDetailView0project_handler', $this->dataset, 'Tasks within this project', $this->RenderText('Tasks'));
         $grid->AddViewColumn($column);
     }
     if (GetCurrentUserGrantForDataSource('project.project')->HasViewGrant()) {
         //
         // View column for projectDetailView1project detail
         //
         $column = new DetailColumn(array('project_id'), 'detail1project', 'projectDetailEdit1project_handler', 'projectDetailView1project_handler', $this->dataset, 'Project Budget Chart', $this->RenderText('Project Budget'));
         $grid->AddViewColumn($column);
     }
     if (GetCurrentUserGrantForDataSource('project.project_timeline_detail')->HasViewGrant()) {
         //
         // View column for project_timeline_detailDetailView2project detail
         //
         $column = new DetailColumn(array('project_id'), 'detail2project', 'project_timeline_detailDetailEdit2project_handler', 'project_timeline_detailDetailView2project_handler', $this->dataset, 'Tasks Gantt view', $this->RenderText('Tasks Gantt view'));
         $grid->AddViewColumn($column);
     }
     //
     // View column for program_name field
     //
     $column = new TextViewColumn('programm_id_program_name', 'Project Type', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for project_name field
     //
     $column = new TextViewColumn('project_name', 'Project Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetEscapeHTMLSpecialChars(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date_start field
     //
     $column = new DateTimeViewColumn('date_start', 'Date Start', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date_end field
     //
     $column = new DateTimeViewColumn('date_end', 'Date End', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for year field
     //
     $column = new TextViewColumn('year', 'Year', $this->dataset);
     $column->SetOrderable(true);
     $column->SetEscapeHTMLSpecialChars(true);
     $column->SetWordWrap(false);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for notes field
     //
     $column = new TextViewColumn('notes', 'Objectives', $this->dataset);
     $column->SetOrderable(true);
     $column->SetMaxLength(75);
     $column->SetFullTextWindowHandlerName('projectGrid_notes_handler_list');
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Name field
     //
     $column = new TextViewColumn('priority_Name', 'Priority', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for username field
     //
     $column = new TextViewColumn('lead_username', 'Project Lead', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for approved_budget field
     //
     $column = new TextViewColumn('approved_budget', 'Approved Budget', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:project.php

示例3: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for name field
     //
     $column = new TextViewColumn('name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetMaxLength(75);
     $column->SetFullTextWindowHandlerName('timesheetDetailEditGrid0taskDetailEdit0department_projects_name_handler_list');
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for task_id field
     //
     $column = new TextViewColumn('task_id', 'Task Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for hours field
     //
     $column = new TextViewColumn('hours', 'Hours', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
     $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);
     $column->SetMaxLength(75);
     $column->SetFullTextWindowHandlerName('timesheetDetailEditGrid0taskDetailEdit0department_projects_notes_handler_list');
     $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);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:49,代码来源:department_projects.php

示例4: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for total_hours field
     //
     $column = new TextViewColumn('total_hours', 'Total Actual Hours', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for project_name field
     //
     $column = new TextViewColumn('project_name', 'Project', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for task_name field
     //
     $column = new TextViewColumn('task_name', 'Task Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for assigned_hours field
     //
     $column = new TextViewColumn('assigned_hours', 'Assigned Hours', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:37,代码来源:Hours_per_project.php

示例5: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for program_name field
     //
     $column = new TextViewColumn('programm_id_program_name', 'Project Type', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for project_name field
     //
     $column = new TextViewColumn('project_name', 'Project Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetMaxLength(75);
     $column->SetFullTextWindowHandlerName('projectDetailEditGrid0program_project_name_handler_list');
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date_start field
     //
     $column = new DateTimeViewColumn('date_start', 'Date Start', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date_end field
     //
     $column = new DateTimeViewColumn('date_end', 'Date End', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     $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);
     $column->SetMaxLength(75);
     $column->SetFullTextWindowHandlerName('projectDetailEditGrid0program_notes_handler_list');
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for priority field
     //
     $column = new TextViewColumn('priority', 'Priority', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for lead field
     //
     $column = new TextViewColumn('lead', 'Lead', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for approved_budget field
     //
     $column = new TextViewColumn('approved_budget', 'Approved Budget', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
     $column = new CurrencyFormatValueViewColumnDecorator($column, 2, ',', '.', $this->RenderText('$'));
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:75,代码来源:program.php

示例6: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     if (GetCurrentUserGrantForDataSource('task.timesheet')->HasViewGrant()) {
         //
         // View column for timesheetDetailView0task detail
         //
         $column = new DetailColumn(array('task_id'), 'detail0task', 'timesheetDetailEdit0task_handler', 'timesheetDetailView0task_handler', $this->dataset, 'Timesheet', $this->RenderText('Timesheet'));
         $grid->AddViewColumn($column);
     }
     //
     // View column for project_id field
     //
     $column = new TextViewColumn('project_id', 'Project', $this->dataset);
     $column->SetOrderable(true);
     $column = new ExtendedHyperLinkColumnDecorator($column, $this->dataset, 'project.php?operation=view&pk0=%project_id%', '');
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for task_name field
     //
     $column = new TextViewColumn('task_name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetMaxLength(75);
     $column->SetFullTextWindowHandlerName('taskGrid_task_name_handler_list');
     $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);
     $column->SetMaxLength(75);
     $column->SetFullTextWindowHandlerName('taskGrid_notes_handler_list');
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for hrs field
     //
     $column = new TextViewColumn('hrs', 'Allocated Hours', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
     $column = new NumberFormatValueViewColumnDecorator($column, 2, ',', '.');
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for assigned_to field
     //
     $column = new TextViewColumn('assigned_to', 'Assigned To', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date_start field
     //
     $column = new DateTimeViewColumn('date_start', 'Date Start', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date_end field
     //
     $column = new DateTimeViewColumn('date_end', 'Date End', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:75,代码来源:task.php

示例7: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for name field
     //
     $column = new TextViewColumn('name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for total_hours field
     //
     $column = new TextViewColumn('total_hours', 'Total Hours', $this->dataset);
     $grid->SetTotal($column, PredefinedAggregate::$Sum);
     $column->SetOrderable(true);
     $column = new NumberFormatValueViewColumnDecorator($column, 2, ',', '.');
     $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);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for task_name field
     //
     $column = new TextViewColumn('task_id_task_name', 'Task Id', $this->dataset);
     $column->SetOrderable(true);
     $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);
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
 }
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:46,代码来源:Pay_Period.php


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