<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Anexos.ascx.vb" Inherits="WebFoundations.WFWorkflow.UI.Anexos1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="~/WFControls/AccessList.ascx" TagName="AccessList" TagPrefix="uc2" %>
<script language="javascript">
    function ShowAttachment(pageURL, useOptions) {
        if (useOptions == 1) {
            window.open(pageURL, '', 'left=5,top=45,screenX=5,screenY=45,scrollbars=yes, resizable=yes,width=' + (screen.availWidth - 25) + ',height=' + (screen.availHeight - 60));
        } else {
            window.open(pageURL);
        }
    }
</script>

<center>
  <div class="posBtnAnexo3">
    <asp:LinkButton ID="lnkArquivos" CssClass="btnArquivosOff" runat="server" />
  </div>
  <!---->
  <telerik:RadGrid id="grdanexos" runat="server" AutoGenerateColumns="false"  AllowSorting="False" 
            GridLines="None"  AllowPaging="True" PageSize="20" AllowMultiRowSelection="true">
    <MasterTableView Width="100%">
      <Columns>
      <telerik:GridClientSelectColumn UniqueName="ATTSELECTION" />
      <telerik:GridTemplateColumn UniqueName="EDITITEM" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center">
        <ItemTemplate>
          <asp:ImageButton ID="btnedit" runat="server" ImageUrl="~/WFResources/Common/Images/Icons/edit.png"  />
        </ItemTemplate>
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn UniqueName="DELETEITEM"  HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center">
        <ItemTemplate>
          <asp:ImageButton ID="btndelete" runat="server" ImageUrl="~/WFResources/Common/Images/Icons/delete.png"  />
        </ItemTemplate>
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn UniqueName="ITEMICON"  HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center">
        <ItemTemplate>
            <asp:HyperLink ID="lnkview" runat="server" />
            <asp:HiddenField ID="hidAttId" runat="server" />
        </ItemTemplate>
      </telerik:GridTemplateColumn>
      <telerik:GridBoundColumn DataField="Nome" UniqueName="NOME"  ItemStyle-HorizontalAlign="center"  HeaderStyle-HorizontalAlign="center"/>
      <telerik:GridBoundColumn DataField="Descricao" UniqueName="DESCRICAO"  ItemStyle-HorizontalAlign="center"  HeaderStyle-HorizontalAlign="center"/>
      <telerik:GridBoundColumn DataField="Gerador" UniqueName="GERADOR" ItemStyle-HorizontalAlign="center"  HeaderStyle-HorizontalAlign="center"/>
      <telerik:GridBoundColumn DataField="Geracao" UniqueName="GERACAO" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center" />
      <telerik:GridBoundColumn DataField="SubProcessTitle" UniqueName="SUBPROCESSTITLE" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center" />
      <telerik:GridBoundColumn DataField="Tipo" UniqueName="ITEMTYPE" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center" />
      <telerik:GridTemplateColumn  UniqueName="ITEMHISTORY"  HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center">
        <ItemTemplate>
            <div style="width:100%;display:flex;">
                <div style="width:50%;font-weight:bold;"><asp:Label ID="lblCounter" runat="server" /></div>
                <div style="width:50%"><asp:ImageButton ID="btnhistory" runat="server" ImageUrl="~/WFResources/Common/images/icons/add.png"  /></div>
            </div>
        </ItemTemplate>
      </telerik:GridTemplateColumn>
      </Columns>
    </MasterTableView>
    <ClientSettings AllowColumnsReorder="false" AllowDragToGroup="false" 
                AllowColumnHide="false" Selecting-AllowRowSelect="true" Scrolling-AllowScroll="true" 
                Scrolling-UseStaticHeaders="true" >
      <Selecting EnableDragToSelectRows="False" />
      <Scrolling AllowScroll="false" UseStaticHeaders="True"></Scrolling>
    </ClientSettings>
  </telerik:RadGrid>
    <div style="width: 100%; text-align:right;padding:0.5em">
        <asp:Button ID="btnDownload" runat="server" />
    </div>

  <asp:Panel ID="pnlnew" runat="server">
    <section class="geralForm">
      <div class="itemForm">
        <label><asp:Label ID="lbldescricao" runat="server"></asp:Label></label>
        <asp:TextBox ID="txtdescricao" runat="server" CssClass="textAreaAnexo" TextMode="MultiLine"></asp:TextBox>
      </div>
      <div class="linhaPontilhada2"></div>
      <asp:Panel ID="pnlFileUpload" cssclass="itemForm" runat="server">
        <label>
        <asp:Label ID="lblarquivo" runat="server"></asp:Label>
        </label>
        <table border="0" cellpadding="0" cellspacing="0" align="left">
          <tr id="fileupload" runat="server">
            <td class="texto_campo"><asp:FileUpload ID="uplArquivo" runat="server" /></td>
          </tr>
        </table>
        <br><br>
      <div class="linhaPontilhada2"></div>
      </asp:Panel>
    <div class="itemForm">
    <label><asp:Label ID="lblacesso" runat="server" /></label>
    <div class="controleListaAcesso"><uc2:AccessList ID="listaacesso" DisableItems="-6;-5;-4;-3;-2" EnableUser=true PanelsHeight=30 EnableRole=true EnableRoleGroup=false runat="server" /></div>
    </div>
    </section>
    <div class="posControleAnexo2">
    <asp:Button ID="btnok" runat="server" CssClass="btn-cinza" />
    <asp:Button ID="btncancel" runat="server" CssClass="btn-cinza" /> 
    </div>
    
    </asp:Panel>
</center>
