PageRenderTime 19ms CodeModel.GetById 9ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://pigeoncms.googlecode.com/
ASP.NET | 99 lines | 91 code | 8 blank | 0 comment | 0 complexity | c710a37da8ae869581b691352ad79655 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"><%=PigeonCms.Utility.GetLabel("LblLoading", "loading") %></div>
 7    </ProgressTemplate>
 8</asp:UpdateProgress>
 9    
10<asp:UpdatePanel ID="Upd1" runat="server">
11<ContentTemplate>
12    <asp:Label ID="LblErr" runat="server" Text="" CssClass="errore"></asp:Label>
13    <asp:Label ID="LblOk" runat="server" Text="" CssClass="success"></asp:Label>
14    <br />
15
16    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
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" />&nbsp;
21                <asp:Button ID="BtnApplySettings" runat="server" Text="Applica" CssClass="button" OnClick="BtnApply_Click" />
22            </div>
23            <br />
24            <asp:GridView ID="Grid1" runat="server" AllowPaging="True" AllowSorting="false" Width="100%" AutoGenerateColumns="False"
25                DataSourceID="ObjDs1" DataKeyNames="KeyName" OnRowCommand="Grid1_RowCommand" OnRowCreated="Grid1_RowCreated" OnRowDataBound="Grid1_RowDataBound">
26                <Columns>
27                    <asp:TemplateField ItemStyle-VerticalAlign="Top">
28                        <ItemTemplate>
29                        <asp:ImageButton ID="LnkSel" CommandName="Select" CommandArgument='<%#Eval("KeyName") %>' 
30                        runat="server" SkinID="ImgEditFile" />                
31                        </ItemTemplate>
32                    </asp:TemplateField>
33                    <asp:BoundField DataField="KeyName" HeaderText="Nome" SortExpression="KeyName" ItemStyle-VerticalAlign="Top" />
34                    <asp:BoundField DataField="KeyTitle" HeaderText="Titolo" SortExpression="KeyTitle" ItemStyle-VerticalAlign="Top" />
35                    <asp:TemplateField ItemStyle-VerticalAlign="Top">
36                        <ItemTemplate>
37                        <asp:Label runat="server" ID="LblKeyValue"></asp:Label>
38                        </ItemTemplate>
39                    </asp:TemplateField>
40                    <asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="20" ItemStyle-VerticalAlign="Top">
41                        <ItemTemplate>
42                        <asp:ImageButton ID="LnkDel" CommandName="DeleteRow" CommandArgument='<%#Eval("KeyName") %>' runat="server" SkinID="ImgDelFile" 
43                        OnClientClick="return confirm('Cancellare la riga?');"  />
44                        </ItemTemplate>
45                    </asp:TemplateField>
46                </Columns>
47            </asp:GridView>
48            
49            <asp:ObjectDataSource ID="ObjDs1" runat="server" SelectMethod="GetSettings" TypeName="PigeonCms.AppSettingsManager">
50                <SelectParameters></SelectParameters>
51                <DeleteParameters>
52                    <asp:Parameter Name="KeyName" Type="String" />
53                </DeleteParameters>
54            </asp:ObjectDataSource>
55        </asp:View>
56   
57        <asp:View ID="ViewInsert" runat="server">
58            <div class="adminToolbar">
59                <asp:Button ID="BtnSave" runat="server" Text="Salva" CssClass="button" OnClick="BtnSave_Click" />
60                <asp:Button ID="BtnCancel" runat="server" Text="Annulla" CssClass="button" OnClick="BtnCancel_Click" />
61            </div>
62        
63            <div class="col width-100">
64            <fieldset class="adminForm">
65                <legend></legend>
66                <asp:HiddenField ID="HiddenNewRecord" runat="server" />
67                <table class="adminTable">
68                <tr>
69                    <td class="key">Key Name</td>
70                    <td style="width: 571px">
71                        <asp:TextBox ID="TxtKeyName" MaxLength="50" runat="server" Enabled="false" CssClass="adminText"></asp:TextBox>
72                    </td>
73                </tr>          
74                <tr>
75                    <td class="key">Titolo</td>
76                    <td>
77                        <asp:TextBox ID="TxtKeyTitle" MaxLength="500" runat="server" CssClass="adminText" Height="50px" TextMode="MultiLine"></asp:TextBox>
78                    </td>
79                </tr>
80                <tr>
81                    <td class="key">Valore</td>
82                    <td>
83                        <asp:TextBox ID="TxtKeyValue" MaxLength="500" runat="server" CssClass="adminText"></asp:TextBox>
84                    </td>
85                </tr>
86                <tr>
87                    <td class="key">Info aggiuntive</td>
88                    <td>
89                        <asp:TextBox ID="TxtKeyInfo" MaxLength="500" runat="server" CssClass="adminText" Height="50px" TextMode="MultiLine"></asp:TextBox>
90                    </td>
91                </tr>
92                </table>
93            </fieldset>
94            </div>
95        </asp:View>
96    </asp:MultiView>
97
98</ContentTemplate>
99</asp:UpdatePanel>