| |||||||||||||||||
Source File | Conditionals | Statements | Methods | TOTAL | |||||||||||||
Web\WebBuilders\ItemTemplates\SearchItemTemplate.cs | - | 0,0 % | 0,0 % | 0,0 % |
|
1 | #region Copyright | |
2 | /* | |
3 | ShowX. Maps business objects into presentation layer. | |
4 | Copyright (C) 2005 Jesus Diaz. | |
5 | ||
6 | This library is free software; you can redistribute it and/or | |
7 | modify it under the terms of the GNU Lesser General Public | |
8 | License as published by the Free Software Foundation; either | |
9 | version 2.1 of the License, or (at your option) any later version. | |
10 | ||
11 | This library is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | Lesser General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU Lesser General Public | |
17 | License along with this library; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
19 | ||
20 | For project details see: http://showx.sourceforge.net | |
21 | */ | |
22 | #endregion | |
23 | ||
24 | using System; | |
25 | using System.Web.UI.WebControls; | |
26 | using ShowX.Web.WebControls; | |
27 | ||
28 | namespace ShowX.Web.WebBuilders.ItemTemplates | |
29 | { | |
30 | /// <summary> | |
31 | /// Template to represent a search over an <see cref="AdminElement"/> control. | |
32 | /// </summary> | |
33 | public class SearchItemTemplate : ElemTemplate { | |
34 | ||
35 | /// <summary> | |
36 | /// Constructor. | |
37 | /// </summary> | |
38 | /// <param name="type">Type associated to owner control.</param> | |
39 | /// <param name="owner"><see cref="AdminElement"/> owner of this template.</param> | |
40 | 0 | public SearchItemTemplate(Type type, AdminElement owner) : base (type,owner) {} |
41 | ||
42 | /// <summary> | |
43 | /// Build buttons associated to this control. | |
44 | /// </summary> | |
45 | /// <param name="tableRow">Table Row where to locate buttons.</param> | |
46 | 0 | public override void BuildButtons(TableRow tableRow) |
47 | { | |
48 | TableCell tableCell = new TableCell(); | |
49 | tableRow.Cells.Add(tableCell); | |
50 | tableCell = new TableCell(); | |
51 | tableRow.Cells.Add(tableCell); | |
52 | ||
53 | Button button = new Button(); | |
54 | button.Text = "Search"; | |
55 | button.ControlStyle.MergeWith(owner.ChildControlStyle); | |
56 | button.CommandName = "Search"; | |
57 | tableCell.Controls.Add(button); | |
58 | ||
59 | tableCell.Controls.Add(button); | |
60 | } | |
61 | } | |
62 | } | |
63 |
|