PageRenderTime 25ms CodeModel.GetById 15ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/pigeoncms/Modules/PigeonCms.MenuTypesAdmin/views/Default.ascx

http://pigeoncms.googlecode.com/
ASP.NET | 88 lines | 76 code | 12 blank | 0 comment | 0 complexity | 5295006d4b9fda6d3c0d1b9c53b47f97 MD5 | raw file
 1<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Default.ascx.cs" Inherits="Controls_Default" %>
 2
 3<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
 4<asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="1" AssociatedUpdatePanelID="Upd1">
 5    <ProgressTemplate>
 6        <div class="loading">caricamento..</div>
 7    </ProgressTemplate>
 8</asp:UpdateProgress>
 9    
10<asp:UpdatePanel ID="Upd1" runat="server">
11<ContentTemplate>
12    
13    <asp:Label ID="LblErr" runat="server" Text="" CssClass="errore"></asp:Label>
14    <asp:Label ID="LblOk" runat="server" Text="" CssClass="success"></asp:Label>
15    
16    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0" OnActiveViewChanged="MultiView1_ActiveViewChanged">
17    
18        <asp:View ID="ViewSee" runat="server">
19            <div class="adminToolbar">
20                <asp:Button ID="BtnNew" runat="server" Text="Nuovo" CssClass="button" OnClick="BtnNew_Click" />
21            </div>
22            <br />
23
24            <asp:GridView ID="Grid1" runat="server" Width="100%" AllowPaging="True" AllowSorting="true" AutoGenerateColumns="False"
25                DataSourceID="ObjDs1" DataKeyNames="Id" OnRowCommand="Grid1_RowCommand" OnRowCreated="Grid1_RowCreated" OnRowDataBound="Grid1_RowDataBound">
26                <Columns>
27                    <asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="15">
28                        <ItemTemplate>
29                            <asp:ImageButton ID="LnkSel" CommandName="Select" CommandArgument='<%#Eval("Id") %>' 
30                                runat="server" SkinID="ImgEditFile" />      
31                        </ItemTemplate>
32                    </asp:TemplateField>
33                    <asp:BoundField DataField="MenuType" HeaderText="MenuType" SortExpression="MenuType" />
34                    <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
35                    <asp:BoundField DataField="Id" HeaderText="Id" />
36                    <asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
37                        <ItemTemplate>
38                            <asp:ImageButton ID="LnkDel" CommandName="DeleteRow" CommandArgument='<%#Eval("Id") %>' runat="server" 
39                                SkinID="ImgDelFile" OnClientClick="return confirm('Cancellare la riga?');"  />
40                        </ItemTemplate>
41                    </asp:TemplateField>
42                </Columns>
43            </asp:GridView>
44            
45            <asp:ObjectDataSource ID="ObjDs1" runat="server" SortParameterName="sort" OnSelecting="ObjDs1_Selecting"
46                SelectMethod="GetByFilter" TypeName="PigeonCms.MenutypesManager">
47                <SelectParameters>
48                    <asp:Parameter Name="filter" Type="object" />
49                    <asp:Parameter Name="sort" Type="String" DefaultValue="Nome" />
50                </SelectParameters>
51                <DeleteParameters>
52                    <asp:Parameter Name="Id" Type="Int32" />
53                </DeleteParameters>
54            </asp:ObjectDataSource>
55        </asp:View>
56   
57
58        <asp:View ID="ViewInsert" runat="server">
59            <div class="divAdminInsertPanel">
60
61                <div class="adminToolbar">                
62                    <asp:Button ID="BtnSave" runat="server" Text="<%$ Resources:PublicLabels, CmdSave %>" CssClass="button" OnClick="BtnSave_Click" />
63                    <asp:Button ID="BtnCancel" runat="server" Text="<%$ Resources:PublicLabels, CmdCancel %>" CssClass="button" OnClick="BtnCancel_Click" />
64                </div>
65                
66                <table cellspacing="0" cellpadding="5">
67                <tr>
68                    <td>Nome</td>
69                    <td colspan="3">
70                        <asp:TextBox ID="TxtMenuType" MaxLength="50" runat="server" CssClass="adminSmallText"></asp:TextBox></td>
71                </tr>
72                <tr>
73                    <td>Titolo</td>
74                    <td colspan="3">
75                        <asp:TextBox ID="TxtTitle" MaxLength="200" runat="server" CssClass="adminText"></asp:TextBox></td>
76                </tr>
77                <tr>
78                    <td>Descrizione</td>
79                    <td colspan="3">
80                        <asp:TextBox ID="TxtDescription" MaxLength="200" runat="server" CssClass="adminText"></asp:TextBox></td>
81                </tr>
82                </table>
83            </div>            
84        </asp:View>
85    </asp:MultiView>
86
87</ContentTemplate>
88</asp:UpdatePanel>