<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Documento.aspx.cs" Inherits="PortalTransparencia.Admin.Documento" MasterPageFile="Admin.Master"  %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>    
    <script src="jquery-toastmessage/src/main/javascript/jquery.toastmessage.js" type="text/javascript"></script>    
    <link href="jquery-toastmessage/src/main/resources/css/jquery.toastmessage.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">

        function showSuccessToast() {
            $().toastmessage('showSuccessToast', "Dialogo Exibido com Sucesso...");
        }
        function showStickySuccessToast() {
            $().toastmessage('showToast', {
                text: 'Dialogo Exibido com Sucesso - Dialogo Fixo',
                sticky: true,
                position: 'top-right',
                type: 'success',
                closeText: '',
                close: function () {
                    console.log("toast is closed ...");
                }
            });

        }
        function showNoticeToast() {
            $().toastmessage('showNoticeToast', "Notice  Dialog ");
        }
        function showStickyNoticeToast() {
            $().toastmessage('showToast', {
                text: 'Notice Dialog Fixo',
                sticky: true,
                position: 'top-left',
                type: 'notice',
                closeText: '',
                close: function () { console.log("toast is closed ..."); }
            });
        }
        function showWarningToast() {
            $().toastmessage('showWarningToast', "Warning Dialog ");
        }
        function showStickyWarningToast() {
            $().toastmessage('showToast', {
                text: 'Warning Dialog Fixo',
                sticky: true,
                position: 'middle-right',
                type: 'warning',
                closeText: '',
                close: function () {
                    console.log("toast is closed ...");
                }
            });
        }
        function showErrorToast() {
            $().toastmessage('showErrorToast', "Error Dialog  ...");
        }
        function showStickyErrorToast() {
            $().toastmessage('showToast', {
                text: 'Error Dialog Fixo',
                sticky: true,
                position: 'center',
                type: 'error',
                closeText: '',
                close: function () {
                    console.log("toast is closed ...");
                }
            });
        }

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager runat="server" ID="ScriptManagerMaster1" EnableScriptGlobalization="true"
        AsyncPostBackTimeout="900" EnableScriptLocalization="true" EnablePageMethods="true">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="upnCadastro">
        <ProgressTemplate>
            <%--<ldg:ucLoading ID="ucLoading1" runat="server" />--%>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel runat="server" ID="upnCadastro" ClientIDMode="Static">
        <ContentTemplate>
            <asp:MultiView runat="server" ID="mltCadatro" ActiveViewIndex="0">
                <asp:View runat="server" ID="viewGrid">
                    <div id="home" class="meio">
                        <div class="container">
                            <div class="limite">
                                <div class="esquerda">
                                    <div class="box">
                                        <h2 class="titulo">
                                            Documento</h2>
                                        <ul class="form">
                                            <li>
                                            <span class="titulo">
                                            </span>
                                            </li>
                                            <li>
                                                <asp:Button runat="server" ID="Button1" CssClass="btazul" Text="Novo" OnClick="btnNovo_OnClick" />
                                                <asp:Button runat="server" ID="Button3" CssClass="btazul" Text="Voltar" OnClick="btnVoltar_OnClick" />
                                            </li>
                                            <li><span class="titulo">
                                                <br />
                                            </span></li>
                                            <li><span class="titulo">
                                                <br />
                                            </span></li>
                                            <li>
                                            <asp:GridView runat="server" ID="gridView" onrowcommand="gridView_RowCommand" DataKeyNames="id_Documento" Width="200%"
                                            AllowPaging="true" PageSize="7" OnPageIndexChanging="gridView_PageIndexChanging" AutoGenerateColumns="false">
                                                <Columns>
                                                    <%--<asp:ButtonField ButtonType="Image" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center" ImageUrl="~/img/ico-edit.png" Text="Editar" CommandName="Editar" HeaderText="Editar" />--%>
                                                    <asp:ButtonField ButtonType="Image" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center" ImageUrl="~/img/ico-excluir.png" Text="Excluir" CommandName="Excluir" HeaderText="Excluir" />
                                                    <asp:BoundField HeaderText="Código" DataField="id_Documento" HeaderStyle-Width="70px" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField HeaderText="Cód. Tipo Doc" DataField="id_DocumentoTipo" HeaderStyle-Width="75px" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField HeaderText="Descrição" DataField="ds_DocumentoTipo" HeaderStyle-Width="300px" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField HeaderText="Documento" DataField="nm_Documento" HeaderStyle-Width="250px" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField HeaderText="Arquivo" DataField="im_Documento" HeaderStyle-Width="300px" ItemStyle-HorizontalAlign="Center" />                                                    
                                                    <asp:BoundField HeaderText="Data" DataField="dt_Documento" HeaderStyle-Width="300px" ItemStyle-HorizontalAlign="Center" />
                                                </Columns>
                                            </asp:GridView>
                                            </li>
                                        </ul>
                                        <ul class="form">
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:View>
                <asp:View runat="server" ID="viewCadastro">
                </asp:View>
            </asp:MultiView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
