<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CorrentVotes.aspx.cs" Inherits="CorrentVotes" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <table style="width:100%;">
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server" Text="رای گیری های موجود"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    CellPadding="4" DataKeyNames="RaigiriTitleId" 
                    DataSourceID="LinqDtsRaigiriMojod" ForeColor="#333333" GridLines="None" 
                    Width="98%" >
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:BoundField DataField="RaigiriTitleId" HeaderText="کد" 
                            InsertVisible="False" ReadOnly="True" SortExpression="RaigiriTitleId" />
                        <asp:BoundField DataField="RaigiriName" HeaderText="عنوان" 
                            SortExpression="RaigiriName" />
                        <asp:CheckBoxField DataField="CloseBit" HeaderText="CloseBit" 
                            SortExpression="CloseBit" Visible="False" />
                        <asp:BoundField DataField="DateCreation" HeaderText="تاریخ شروع" 
                            SortExpression="DateCreation" />
                        <asp:BoundField DataField="DateFinish" HeaderText="تاریخ پایان" 
                            SortExpression="DateFinish" />
                        <asp:TemplateField HeaderText="نمایش جزئیات">
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server" 
                                    NavigateUrl='<%# "User_GetVote.aspx?ID=" + Eval("RaigiriTitleId") %>'>جزئیات</asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                <asp:LinqDataSource ID="LinqDtsRaigiriMojod" runat="server" 
                    ContextTypeName="Lsc_EVotingDataContext" EntityTypeName="" 
                    OrderBy="RaigiriTitleId desc" TableName="tblRaigiriTitles" 
                    Where="CloseBit != @CloseBit">
                    <WhereParameters>
                        <asp:Parameter DefaultValue="true" Name="CloseBit" Type="Boolean" />
                    </WhereParameters>
                </asp:LinqDataSource>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

