<%@ Page Language="C#" MasterPageFile="~/Login/UserPage.Master" AutoEventWireup="true" CodeBehind="User_Invitation.aspx.cs" Inherits="LoveWeb.Login.User_Invitation" %>

<asp:Content ID="content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <title>用户帖子</title>
</head>
<body>

    <div style="height: 324px">
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="objInvi" AllowPaging="True" DataKeyNames="Invitationid" 
            CellPadding="3" BackColor="#DEBA84" BorderColor="#DEBA84" 
            BorderStyle="None" BorderWidth="1px" CellSpacing="2" Width="606px">
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <Columns>
                <asp:BoundField DataField="Invitationid" HeaderText="帖子编号" 
                    SortExpression="Invitationid" />
                <asp:BoundField DataField="Invi_title" HeaderText="帖子标题" 
                    SortExpression="Invi_title" />
                <asp:TemplateField HeaderText="帖子内容" SortExpression="Invi_contents">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Invi_contents") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# GetPartString(Eval("Invi_contents").ToString(),20) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Invi_time" HeaderText="发帖时间" 
                    SortExpression="Invi_time" />
                <asp:BoundField DataField="Invi_click" HeaderText="点击次数" 
                    SortExpression="Invi_click" />
                <asp:BoundField DataField="ReviNum" HeaderText="回复" SortExpression="ReviNum" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
        <asp:ObjectDataSource ID="objInvi" runat="server" 
            DataObjectTypeName="Models.Invitation" DeleteMethod="DelInve" 
            InsertMethod="UpdateInvi" SelectMethod="GetInviByUserId" 
            TypeName="LoveBLL.InvitationManager">
            <SelectParameters>
                <asp:SessionParameter Name="id" SessionField="userid" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    
    </div>
</asp:Content>
