ACCESS网站示例-连载-首页设计

首页布局:部分浏览

首页代码:

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="南無阿弥陀佛!南無观世音菩萨!南無大势至菩萨!南無释迦牟尼佛!南無地藏王菩萨!南無普贤菩萨!" %>

<%@ Register assembly="Meta.Web" namespace="Meta.Web.Controls" tagprefix="mc" %>

<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style8
        {
            width: 100%;
        }
        .style9
        {
            font-size: small;
            color: #0000ff;
        }
        .style10
        {
            color: #0000ff;
            font-size: small;
        }
        .style11
        {
            width: 25%;
            background: #009900;
        }
        .style12
        {
            text-align: left;
            font-size: small;
            width: 50%;
        }
        .style13
        {
            text-align: left;
            font-size: small;
        }
        .style14
        {
            font-size: small;
            text-align: left;
            width: 80%;
        }
        .style15
        {
            width: 35%;
            text-align: left;
            font-size: small;
        }
        .style16
        {
            width: 65%;
            text-align: left;
            font-size: small;
        }
        .style17
        {
            width: 20%;
            font-size: small;
            color: #FF0000;
        }
        .style18
        {
            width: 20%;
            font-size: small;
            color: #0000ff;
        }
        .style19
        {
            width: 20%;
            background: #009900;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table cellpadding="0" cellspacing="0" class="style8">
        <tr>
            <td>
                <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:MultiView ID="MultiView1" runat="server">
                            <asp:View ID="View1" runat="server">
                                <table cellspacing="1" class="style8">
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            同修登陆</td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            名称</td>
                                        <td class="style18">
                                            <asp:TextBox ID="TextBox2" runat="server" Width="97%"></asp:TextBox>
                                        </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            密码</td>
                                        <td class="style18">
                                            <asp:TextBox ID="TextBox3" runat="server" TextMode="Password" Width="97%"></asp:TextBox>
                                        </td>
                                        <td class="style18">
                                            <asp:Button ID="Button1" runat="server" οnclick="Button1_Click" Text="确定" />
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="View2" runat="server">
                                <table cellspacing="1" class="style8">
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style10" colspan="3">
                                            为了维护您的合法权益应定时修改密码并保管好!</td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            原始密码</td>
                                        <td class="style18">
                                            <asp:TextBox ID="TextBox4" runat="server" TextMode="Password" Width="97%"></asp:TextBox>
                                            </td>
                                        <td class="style10" colspan="2">
                                            <asp:Label ID="Label4" runat="server"></asp:Label>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            新设密码</td>
                                        <td class="style18">
                                            <asp:TextBox ID="TextBox5" runat="server" TextMode="Password" Width="97%"></asp:TextBox>
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            确认密码</td>
                                        <td class="style18">
                                            <asp:TextBox ID="TextBox6" runat="server" TextMode="Password" Width="97%"></asp:TextBox>
                                            </td>
                                        <td class="style10" colspan="2">
                                            <asp:Label ID="Label5" runat="server"></asp:Label>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style10" colspan="2">
                                            <asp:Label ID="Label6" runat="server"></asp:Label>
                                            </td>
                                        <td class="style18">
                                            <asp:Button ID="Button2" runat="server" οnclick="Button2_Click" Text="修改" />
                                            </td>
                                        <td class="style18">
                                            <asp:LinkButton ID="LinkButton1" runat="server" οnclick="LinkButton1_Click">返回</asp:LinkButton>
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="View3" runat="server">
                                <table cellspacing="1" class="style8">
                                    <tr>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style9">
                                            佛、菩萨诞辰</td>
                                        <td class="style10" colspan="2">
                                            佛学资源</td>
                                        <td class="style9">
                                            计划日记</td>
                                    </tr>
                                    <tr>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style9" valign="top">
                                            <asp:DataList ID="DataList1" runat="server" CellPadding="4" ForeColor="#333333" 
                                                Width="100%" onitemdatabound="DataList1_ItemDataBound">
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <AlternatingItemStyle BackColor="White" />
                                                <ItemStyle BackColor="#EFF3FB" />
                                                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderTemplate>
                                                    <table cellspacing="1" class="style8">
                                                        <tr>
                                                            <td class="style16">
                                                                佛、菩萨名称</td>
                                                            <td class="style15">
                                                                日期[农]</td>    
                                                        </tr>
                                                    </table>
                                                </HeaderTemplate>
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <ItemTemplate>
                                                    <table cellspacing="1" class="style8">
                                                        <tr>
                                                            <td class="style16">
                                                                <asp:Image ID="Image1" runat="server" ImageUrl="~/images/lianhua.bmp" 
                                                                    ToolTip="佛、菩萨圣诞、涅槃、出家、成道纪念日" /><asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "FO_DANCHENG")%>'></asp:Label>
                                                            </td>
                                                            <td class="style15">
                                                                <asp:Label ID="Label2" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "FO_DANCHENG_DATE")%>'></asp:Label>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:DataList>
                                            </td>
                                        <td class="style10" colspan="2" valign="top">
                                            <asp:DataList ID="DataList2" runat="server" CellPadding="4" ForeColor="#333333" 
                                                Width="100%">
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <AlternatingItemStyle BackColor="White" />
                                                <ItemStyle BackColor="#EFF3FB" />
                                                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderTemplate>
                                                    <table cellspacing="1" class="style8">
                                                        <tr>
                                                            <td class="style14">
                                                                佛学资源名称(视频、音频、电子书籍)</td>
                                                            <td class="style13">
                                                                大小[Mb]</td>
                                                        </tr>
                                                    </table>
                                                </HeaderTemplate>
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <ItemTemplate>
                                                    <table cellspacing="1" class="style8">
                                                        <tr>
                                                            <td class="style14">
                                                                <a href='<%# DataBinder.Eval(Container.DataItem, "ZY_dz")%>' target="_blank"><asp:Image ID="Image2" runat="server" ImageUrl="~/images/Osx37.jpg" 
                                                                    ToolTip="点击下载" /><%# DataBinder.Eval(Container.DataItem,"ZY_bt")%></a></td>
                                                            <td class="style13">
                                                                <%# DataBinder.Eval(Container.DataItem, "ZY_dx")%></td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:DataList>
                                            </td>
                                        <td class="style9" valign="top">
                                            <asp:DataList ID="DataList3" runat="server" CellPadding="4" ForeColor="#333333" Width="100%" >
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <AlternatingItemStyle BackColor="White" />
                                                <ItemStyle BackColor="#EFF3FB" />
                                                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderTemplate>
                                                    <table cellspacing="1" class="style8">
                                                        <tr>
                                                            <td class="style12">
                                                                同修名称</td>
                                                            <td class="style12">
                                                                计划日期</td>
                                                        </tr>
                                                    </table>
                                                </HeaderTemplate>
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <ItemTemplate>
                                                    <table cellspacing="1" class="style8">
                                                        <tr>
                                                            <td class="style12">
                                                                <asp:Image ID="Image3" runat="server" ImageUrl ='<%# Xin_Bie(DataBinder.Eval(Container.DataItem, "JuShi_MinChen"))%>'
                                                                    ToolTip="同修个人计划日记" /><%# DataBinder.Eval(Container.DataItem, "JuShi_MinChen")%>
                                                            </td>
                                                            <td class="style12">
                                                                <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "Ri_Qi")).ToShortDateString()%>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:DataList>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                        <td class="style11">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style9">
                                            </td>
                                        <td class="style9">
                                            </td>
                                        <td class="style9">
                                           </td>
                                        <td class="style9">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style9" valign="top" colspan="4">
                                            <asp:DataList ID="DataList5" runat="server" CellPadding="4" ForeColor="#333333" 
                                                Width="100%" RepeatDirection="Horizontal" RepeatColumns="4" 
                                                style="text-align: center">
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <AlternatingItemStyle BackColor="White" />
                                                <ItemStyle BackColor="#EFF3FB" />
                                                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderTemplate>
                                                    佛教网站资源(友情链接)
                                                </HeaderTemplate>
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="HyperLink5" runat="server" 
                                                        ImageUrl='<%# DataBinder.Eval(Container.DataItem, "W_TuShi") %>' 
                                                        NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "W_wanzhi") %>' 
                                                        Target="_blank" 
                                                        ToolTip='<%# DataBinder.Eval(Container.DataItem, "W_jianjie") %>' Width="99%"><%# DataBinder.Eval(Container.DataItem, "W_mingcheng")%></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:DataList>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style9" colspan="4" valign="top">
                                            <asp:DataList ID="DataList6" runat="server" CellPadding="4" ForeColor="#333333" 
                                                Width="100%" RepeatDirection="Horizontal" RepeatColumns="4" 
                                                style="text-align: center">
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <AlternatingItemStyle BackColor="White" />
                                                <ItemStyle BackColor="#EFF3FB" />
                                                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderTemplate>
                                                    慈善点击(日行一善  举手之劳)
                                                </HeaderTemplate>
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="HyperLink4" runat="server" 
                                                        ImageUrl='<%# DataBinder.Eval(Container.DataItem, "W_TuShi")%>' 
                                                        NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "W_wanzhi")%>' 
                                                        Target="_blank" 
                                                        ToolTip='<%# DataBinder.Eval(Container.DataItem, "W_jianjie")%>' Width="99%"><%# DataBinder.Eval(Container.DataItem, "W_mingcheng")%></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:DataList>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style9" colspan="4" valign="top">
                                            <asp:DataList ID="DataList7" runat="server" CellPadding="4" ForeColor="#333333" 
                                                Width="100%" RepeatDirection="Horizontal" RepeatColumns="4" 
                                                style="text-align: center">
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <AlternatingItemStyle BackColor="White" />
                                                <ItemStyle BackColor="#EFF3FB" />
                                                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderTemplate>
                                                    好站推荐(网址收藏)
                                                </HeaderTemplate>
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="HyperLink6" runat="server" 
                                                        ImageUrl='<%# DataBinder.Eval(Container.DataItem, "W_TuShi")%>' 
                                                        NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "W_wanzhi")%>' 
                                                        Target="_blank" 
                                                        ToolTip='<%# DataBinder.Eval(Container.DataItem, "W_jianjie")%>' Width="99%"><%# DataBinder.Eval(Container.DataItem, "W_mingcheng")%></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:DataList>

                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style13" colspan="4" valign="top">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style13" valign="top">
                                            </td>
                                        <td class="style13" valign="top">
                                            </td>
                                        <td class="style13" valign="top">
                                            </td>
                                        <td class="style9" valign="top">
                                            </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="View4" runat="server">
                                <table cellspacing="1" class="style8">
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style17">
                                            </td>
                                        <td class="style17" valign="top">
                                            <asp:Label ID="Label3" runat="server" ></asp:Label><br />
                                            <asp:Image ID="Image10" runat="server" ImageUrl="images/99.png" />
                                        </td>
                                        <td class="style17">
                                            <asp:Image ID="Image5" runat="server" ImageUrl="images/88.png" />计划日记</td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            佛学修行基础</td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox1" runat="server" Text="念佛菩萨圣号" ToolTip="善护口业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox2" runat="server" Text="不妄言不恶口" ToolTip="善护口业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox3" runat="server" Text="不两舌不绮语" ToolTip="善护口业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox4" runat="server" Text="行住坐卧散念" ToolTip="善护口业" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            <mc:DropDownCalendar ID="DropDownCalendar1" runat="server" Width="100%"><NextPrevStyle BackColor="#8080FF" /><WeekendDayStyle BackColor="#99CCFF" /><DayStyle BackColor="#FFCCFF" /><TitleStyle BackColor="#8080FF" /><DayHeaderStyle BackColor="#FFFFCC" /></mc:DropDownCalendar>
                                            </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox5" runat="server" Text="放生与戒杀行" ToolTip="善护身业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox6" runat="server" Text="礼拜佛与菩萨" ToolTip="善护身业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox7" runat="server" Text="日素食月持斋" ToolTip="善护身业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox8" runat="server" Text="每日慈善点击" 
                                                ToolTip="善护身业(救济困难)" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td  class="style18">
                                            <asp:CheckBox ID="CheckBox9" runat="server" Text="忆佛菩萨功德" ToolTip="善护意业" />
                                            </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox10" runat="server" Text="观照果报前因" ToolTip="善护意业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox11" runat="server" Text="照念头归自性" ToolTip="善护意业" />
                                        </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox12" runat="server" Text="发菩提慈悲心" ToolTip="善护意业" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox13" runat="server" Text="大乘无量寿经" 
                                                ToolTip="熏习佛法:读诵、听闻佛经,听法师佛学讲座,为人演说佛菩萨护法等护生事迹功德,劝说他人亲近佛法,流通佛经。" />
                                            </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox14" runat="server" Text="地藏本誓力经" 
                                                ToolTip="熏习佛法:读诵、听闻佛经,听法师佛学讲座,为人演说佛菩萨护法等护生事迹功德,劝说他人亲近佛法,流通佛经。" />
                                            </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox15" runat="server" Text="普门品与心经" 
                                                ToolTip="熏习佛法:读诵、听闻佛经,听法师佛学讲座,为人演说佛菩萨护法等护生事迹功德,劝说他人亲近佛法,流通佛经。" />
                                            </td>
                                        <td class="style18">
                                            <asp:CheckBox ID="CheckBox16" runat="server" Text="金刚经与坛经" 
                                                ToolTip="熏习佛法:读诵、听闻佛经,听法师佛学讲座,为人演说佛菩萨护法等护生事迹功德,劝说他人亲近佛法,流通佛经。" />
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            修学日记</td>
                                        <td class="style10" colspan="4">
                                            <asp:TextBox ID="TextBox7" runat="server" Height="100px" TextMode="MultiLine" 
                                                Width="98%" BackColor="#EFF3FB"></asp:TextBox>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            <asp:Label ID="Label7" runat="server"></asp:Label>
                                            </td>
                                        <td  class="style18">
                                            <asp:Button ID="Button3" runat="server" οnclick="Button3_Click" Text="完成" />
                                        </td>
                                        <td class="style18">
                                            <asp:Button ID="Button4" runat="server" οnclick="Button4_Click" Text="更新" />
                                        </td>
                                        <td class="style18">
                                            <asp:Button ID="Button5" runat="server" οnclick="Button5_Click" Text="重置" />
                                        </td>
                                        <td class="style18">
                                            <asp:Button ID="Button6" runat="server" οnclick="Button6_Click" Text="返回" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style10" colspan="4">
                                            <asp:DataList ID="DataList4" runat="server" CellPadding="4" ForeColor="#333333" 
                                                onitemcommand="DataList4_ItemCommand" onitemdatabound="DataList4_ItemDataBound" 
                                                Width="99%">
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <AlternatingItemStyle BackColor="White" />
                                                <ItemStyle BackColor="#EFF3FB" />
                                                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderTemplate>
                                                    计划日记列表
                                                </HeaderTemplate>
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <ItemTemplate>
                                                    <table cellspacing="1" class="style8">
                                                        <tr>
                                                            <td class="style18">
                                                                <asp:Image ID="Image4" runat="server" 
                                                                    ImageUrl='<%# Xin_Bie(DataBinder.Eval(Container.DataItem, "JuShi_MinChen"))%>' />
                                                                <%# DataBinder.Eval(Container.DataItem, "JuShi_MinChen")%></td>
                                                            <td class="style18">
                                                            </td>
                                                            <td class="style18">
                                                                <asp:Image ID="Image8" runat="server" 
                                                                    ImageUrl="images/POST-16-1091065032-1.PNG" />
                                                                内容详情</td>
                                                            <td class="style18">
                                                            </td>
                                                            <td class="style18">
                                                                <asp:Image ID="Image7" runat="server" ImageUrl="images/Hein003.jpg" />
                                                                <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "Ri_Qi")).ToShortDateString()%></td>
                                                        </tr>
                                                        <tr>
                                                            <td class="style10" colspan="5">
                                                                <asp:TextBox ID="TextBox8" runat="server" Height="100px" 
                                                                    Text='<%#NeiRong(DataBinder.Eval(Container.DataItem, "Kou_Ye"), DataBinder.Eval(Container.DataItem, "Shen_Ye"), DataBinder.Eval(Container.DataItem, "Yi_Ye"), DataBinder.Eval(Container.DataItem, "Xun_Xi"), DataBinder.Eval(Container.DataItem, "QiTa_ShuoMin"), DataBinder.Eval(Container.DataItem, "Shi_Jian"), DataBinder.Eval(Container.DataItem, "Pin_Yu"))%>' 
                                                                    TextMode="MultiLine" Width="99%" BackColor="#EFF3FB"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="style18">
                                                                <asp:CheckBox ID="CheckBox17" runat="server" 
                                                                    Checked='<%# DataBinder.Eval(Container.DataItem, "Gong_Kai") %>' 
                                                                    Enabled="false" />
                                                                <asp:LinkButton ID="LinkButton4" runat="server" 
                                                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ZuoYe_id") %>' 
                                                                    CommandName="GongKai_getID" 
                                                                    ToolTip='<%# DataBinder.Eval(Container.DataItem, "Gong_Kai")+"如果您选择公开选项,则其他同修可以看到。" %>'>公开</asp:LinkButton>
                                                            </td>
                                                            <td class="style18">
                                                            </td>
                                                            <td class="style18">
                                                            </td>
                                                            <td class="style18">
                                                                <asp:Image ID="Image5" runat="server" ImageUrl="images/NOTAS1.PNG" />
                                                                <asp:LinkButton ID="LinkButton2" runat="server" 
                                                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ZuoYe_id")%>' 
                                                                    CommandName="PinYu_getID" Enabled="False" 
                                                                    ToolTip="评语:评语要简练,写在(修学日记:)输入框里面,然后点击需加入评语的记录的下面[评语]按钮完成。">评语</asp:LinkButton>
                                                            </td>
                                                            <td class="style18">
                                                                <asp:Image ID="Image6" runat="server" ImageUrl="images/shan_chu.bmp" />
                                                                <asp:LinkButton ID="LinkButton3" runat="server" 
                                                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ZuoYe_id")%>' 
                                                                    CommandName="GuanLi_getID" Enabled="False" ToolTip="网站管理。">删除</asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:DataList>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                        </td>
                                        <td class="style10" colspan="4">
                                            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" 
                                                CustomInfoHTML="共有<b><font color='red'>%RecordCount%</font></b>条记录 每页<b><font color='red'>%PageSize%</font></b>条 当前页<font color='red'><b>%CurrentPageIndex%/%PageCount%</b></font>" 
                                                firstpagetext="首页" lastpagetext="末页" nextpagetext="下页" 
                                                onpagechanged="AspNetPager1_PageChanged" prevpagetext="上页" 
                                                ShowCustomInfoSection="Right" style="text-align: center" width="99%"></webdiyer:AspNetPager>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                        </td>
                                        <td class="style18">
                                        </td>
                                        <td class="style18">
                                        </td>
                                        <td class="style18">
                                        </td>
                                        <td class="style18">
                                        </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="View5" runat="server">
                                <table cellspacing="1" class="style8">
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            相册类别<br />
                                            <asp:DropDownList ID="DropDownList1" runat="server" ToolTip="分类列表" Width="75%">
                                            </asp:DropDownList>
                                            <br />相册名称<br />
                                            <asp:DropDownList ID="DropDownList2" runat="server" ToolTip="相册列表" Width="75%">
                                            </asp:DropDownList>
                                            </td>
                                        <td class="style10" colspan="3" 
                                            style="background-image: url('file:///E:/Web_XinJinTuJin/images/banner.bmp'); height: 145">
                                            <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" 
                                                codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" 
                                                height="145" width="99%">
                                        <param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="movie" value="images/s37-m.swf" />
                                        <embed quality="high" wmode="transparent"></embed></object>
                                        </td>
                                        <td class="style18">
                                            <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
                                                BorderColor="#999999" DayNameFormat="Shortest" Font-Names="Verdana" 
                                                Font-Size="8pt" ForeColor="Black" Width="99%">
                                                <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                                                <SelectorStyle BackColor="#CCCCCC" />
                                                <WeekendDayStyle BackColor="#FFFFCC" />
                                                <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                                                <OtherMonthDayStyle ForeColor="#808080" />
                                                <NextPrevStyle VerticalAlign="Bottom" />
                                                <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                                                <TitleStyle BackColor="#507CD1" BorderColor="Black" Font-Bold="True" />
                                            </asp:Calendar>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style10" colspan="5">
                                            <asp:DataList ID="DataList9" runat="server" Width="99%" RepeatColumns="5" 
                                                RepeatDirection="Horizontal" >
                                                <ItemTemplate>
                                                <table cellspacing="1" class="style17">
                                                    <tr>
                                                        <td class="style8">
                                                            <asp:Image ID="Image16" runat="server" Width="200px" Height="324px" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Di_Zhi")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "Shuo_Ming")%>' /><br />
                                                            <asp:LinkButton ID="LinkButton5" runat="server" Width="99%"><%# DataBinder.Eval(Container.DataItem, "Ming_Cheng")%></asp:LinkButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                                </ItemTemplate>
                                            </asp:DataList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                        <td class="style19">
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style10" colspan="5">
                                            <webdiyer:AspNetPager ID="AspNetPager2" runat="server" 
                                                CustomInfoHTML="共有<b><font color='red'>%RecordCount%</font></b>条记录 每页<b><font color='red'>%PageSize%</font></b>项 当前页<font color='red'><b>%CurrentPageIndex%/%PageCount%</b></font>" 
                                                firstpagetext="首页" lastpagetext="末页" nextpagetext="下页" 
                                                onpagechanged="AspNetPager2_PageChanged" prevpagetext="上页" 
                                                ShowCustomInfoSection="Right" style="text-align: center" width="99%" 
                                                PageSize="5"></webdiyer:AspNetPager>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="View6" runat="server">
                               <table cellspacing="1" class="style8">
                                    <tr>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                        <td class="style18">
                                            </td>
                                    </tr>
                                </table>
                            </asp:View>
                        </asp:MultiView>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Content>


后台代码:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Meta.Web.Controls;

public partial class _Default : System.Web.UI.Page
{
    bool KongZhi = false, ZuoYeKz = true;
    int GGkz = 0; string StrTime = System.DateTime.Now.ToString();//当前时间
    string DuQu_QuanXian = "*",  Nong_Li_Yue = "";//XianCe_ChuanJian_Ren = "", TpMingCheng = "",

    TiShi_XinXi Ts_XinXi = new TiShi_XinXi(); 
    Bei_Fen_DaTa BeiFen_ShuJu = new Bei_Fen_DaTa(); 
    ShuJuKu_ChaoZuo ShuJu = new ShuJuKu_ChaoZuo();

    protected void Page_Load(object sender, EventArgs e)
    {
        Nong_li();
        if (!Page.IsPostBack)
        {
            //int aa = ShuJu.DuQu_TiaoShu("CeShi");

            MultiView1.ActiveViewIndex = 2;
            //DataSet Fo_PuSa_Dan_Cheng = Socut.Data.ExecuteDataSet("SELECT TOP 16 * FROM FO_DAN order by FO_ID asc");
            DataSet Fo_PuSa_Dan_Cheng = ShuJu.XianShi_ShenXu(16, "FO_DAN", "FO_ID");
            DataList1.DataSource = Fo_PuSa_Dan_Cheng;
            DataList1.DataBind();

            FoPuSa_XianCe();

            //DataSet ZiYuan = Socut.Data.ExecuteDataSet("SELECT TOP 16 * FROM ZHI_YUAN order by ZY_id asc");
            DataSet ZiYuan = ShuJu.XianShi_ShenXu(16, "ZHI_YUAN", "ZY_id");
            DataList2.DataSource = ZiYuan;
            DataList2.DataBind();

            ShuaXin_JiHua();

            //DataSet fo_xue = Socut.Data.ExecuteDataSet("SELECT TOP 16 * FROM Youqinglianjie WHERE W_leixin='" + "佛学" + "' order by W_ID asc");
            DataSet fo_xue = ShuJu.XianShi_JiLu1_ShenXu(16, "Youqinglianjie", "W_leixin","佛学", "W_ID");
            DataList5.DataSource = fo_xue;
            DataList5.DataBind();

            //DataSet CiShan = Socut.Data.ExecuteDataSet("SELECT TOP 16 * FROM Youqinglianjie WHERE W_leixin='" + "慈善" + "' order by W_ID asc");
            DataSet CiShan = ShuJu.XianShi_JiLu1_ShenXu(16, "Youqinglianjie", "W_leixin", "慈善", "W_ID");
            DataList6.DataSource = CiShan;
            DataList6.DataBind();

            //DataSet wanzhi = Socut.Data.ExecuteDataSet("SELECT TOP 16 * FROM Youqinglianjie WHERE W_leixin='" + "网址" + "' order by W_ID asc");
            DataSet WanZhi = ShuJu.XianShi_JiLu1_ShenXu(16, "Youqinglianjie", "W_leixin", "网址", "W_ID");
            DataList7.DataSource = WanZhi;
            DataList7.DataBind();

            FenLei_LieBiao(); MinCheng_LieBiao(); 
        }
        if (Session["UserName"] != null && Session["UserName"].ToString() != "准备登陆")
        { KongZhi = true; } else { KongZhi = false; if (MultiView1.ActiveViewIndex == 3) { Response.Redirect("default.aspx"); } }
        
    }

    protected void ShuaXin_JiHua()//作业
    {
        //DataSet ZuoYe = Socut.Data.ExecuteDataSet("SELECT TOP 16 * FROM WanChenQinKuan order by ZuoYe_id desc");
        DataSet ZuoYe = ShuJu.XianShi_JianXu(16, "WanChenQinKuan", "ZuoYe_id");
        DataList3.DataSource = ZuoYe;
        DataList3.DataBind();
    }

    protected void FoPuSa_XianCe()//佛像册
    {
        //AspNetPager2.RecordCount = (int)Socut.Data.ExecuteScalar("SELECT COUNT(*) FROM Fo_Xian");
        AspNetPager2.RecordCount = ShuJu.DuQu_TiaoShu("Fo_Xian");
        DataSet Fo_PuSa_Xian_Ce = Socut.Data.ExecuteDataSet("SELECT * FROM Fo_Xian order by Fo_Xian_ID asc", AspNetPager2.PageSize * (AspNetPager2.CurrentPageIndex - 1), AspNetPager2.PageSize);
        DataList9.DataSource = Fo_PuSa_Xian_Ce;
        DataList9.DataBind(); 
    }

    protected void Button1_Click(object sender, EventArgs e)//登陆
    {
        //string quanxian = "yes";
        //Socut.Reader drLogin = new Socut.Reader("SELECT * FROM DenLuBiao WHERE DenLuYongHu='" + TextBox2.Text + "' AND DenLuMiMa='" + TextBox3.Text + "' and Yan_zheng='" + quanxian + "'");
        Socut.Reader drLogin = ShuJu.DuQu_JiLu_QuanXian("DenLuBiao", "DenLuYongHu", TextBox2.Text, "DenLuMiMa", TextBox3.Text, "Yan_zheng", "yes");
        if (drLogin.Read())
        {
            Session["UserName"] = TextBox2.Text;
            string strID = drLogin["YhID"].ToString();
            int denglucs = int.Parse(drLogin["DenLuChiShu"].ToString());
            denglucs = denglucs + 1;
            //DataSet myData = Socut.Data.ExecuteDataSet("UPDATE DenLuBiao SET DenLuChiShu='" + denglucs.ToString() + "'WHERE YhID=" + strID + "");
            ShuJu.GenXin_JiLu("DenLuBiao", "DenLuChiShu", denglucs.ToString(), "YhID", Convert.ToByte(strID));
            TextBox2.Enabled = false; TextBox3.Enabled = false;
            Session["Usercs"] = denglucs; Response.Redirect("default.aspx");
            //SanChu.ShuanChu_JiLu("GONGDAN_XINXI", "GD_ID", strID);
            //Response.Write(Ts_XinXi.TiShiXinXi_url("删除成功!", "Gong_Dan_List.aspx"));
        }
        drLogin.Close();
    }

    protected void Button2_Click(object sender, EventArgs e)//修改密码确认
    {
        string[] xiugai = new string[2];
        Label4.Text = ""; Label5.Text = ""; Label6.Text = "";
        if (Session["UserName"] == null)
        { Response.Redirect("default.aspx"); }
        else
        {
            //Socut.Reader drLogin = new Socut.Reader("SELECT * FROM DenLuBiao WHERE DenLuYongHu='" + Session["UserName"].ToString() + "'");
            Socut.Reader drLogin = ShuJu.DuQu_JiLu_DengYu("DenLuBiao", "DenLuYongHu", Session["UserName"].ToString());
            if (drLogin.Read())//如果用户名正确修改资料
            {
                xiugai[0] = drLogin["DenLuMiMa"].ToString();
                xiugai[1] = drLogin["YhID"].ToString();
            }
        }

        if ((xiugai[0] == TextBox4.Text) && (TextBox4.Text != TextBox5.Text))
        {
            if (TextBox5.Text == TextBox6.Text)
            {
                //DataSet myData = Socut.Data.ExecuteDataSet("UPDATE DenLuBiao SET DenLuMiMa='" + TextBox5.Text + "' WHERE YhID=" + xiugai[1] + "");
                ShuJu.GenXin_JiLu("DenLuBiao", "DenLuMiMa", TextBox5.Text, "YhID", Convert.ToByte(xiugai[1]));
                Label6.Text = "密码修改成功,请妥善保管好!"; Label6.ForeColor = System.Drawing.Color.FromName("#FF0000");
                Response.Write(Ts_XinXi.TiShiXinXi("密码修改成功,请妥善保管好!"));
            }
            else { Label5.Text ="新设密码与确认密码不符!"; }
        }
        else { Label4.Text ="与原始密码重复或原始密码错误!"; }
    }

    protected void LinkButton1_Click(object sender, EventArgs e)//修改密码返回
    { MultiView1.ActiveViewIndex = 2; }

    protected string NeiRong(object NR1, object NR2, object NR3, object NR4, object NR5, object NR6, object NR7)//作业内容整合
    {//\n  换行//\r 回车
        string NeiRongs = "[修学基础]";
        NeiRongs += "善护口业:" + NR1.ToString() + ";善护身业:" + NR2.ToString() + ";善护意业:" + NR3.ToString() + ";熏习佛法:" + NR4.ToString() + ";修学日记:" + NR5.ToString() + "。[" + Convert.ToDateTime(NR6.ToString()) + "]\n(评语:" + NR7.ToString() + ")";
        return NeiRongs;
    }

    protected string Xin_Bie(object X_B)//男女头像设置
    {
        string Xin_Bies = "";
        //Socut.Reader Xin_Bie = new Socut.Reader("SELECT * FROM DenLuBiao WHERE DenLuYongHu like '" + X_B.ToString() + "'");
        Socut.Reader Xin_Bie = ShuJu.DuQu_JiLu_MoHu("DenLuBiao", "DenLuYongHu", X_B.ToString());
        if (Xin_Bie.Read())
        {
            if (Xin_Bie["XinBie"].ToString() == "男") { Xin_Bies = "~/images/tongxiu10.bmp"; }
            if (Xin_Bie["XinBie"].ToString() == "女") { Xin_Bies = "~/images/tongxiu10-1.bmp"; }
        }
        Xin_Bie.Close();
        return Xin_Bies;
    }

    protected void AspNetPager2_PageChanged(object sender, EventArgs e)//佛像册分页
    { FoPuSa_XianCe(); }

    protected void AspNetPager1_PageChanged(object sender, EventArgs e)//打开日记分页
    { DaKai_RiJi(); }

    protected void DaKai_RiJi()//打开日记
    {
        if (KongZhi == true)
        {
            DuQu_QuanXian_SheZhi();
            AspNetPager1.RecordCount = (int)Socut.Data.ExecuteScalar("SELECT COUNT(*) FROM WanChenQinKuan where JuShi_MinChen like '" + DuQu_QuanXian + "'or Gong_Kai=" + Convert.ToBoolean(KongZhi) + "");

            DataSet JiHua_RiJi = Socut.Data.ExecuteDataSet("SELECT * FROM WanChenQinKuan where JuShi_MinChen like '" + DuQu_QuanXian + "'or Gong_Kai=" + Convert.ToBoolean(KongZhi) + " order by ZuoYe_id desc", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize);
            DataList4.DataSource = JiHua_RiJi;
            DataList4.DataBind();
        }
        else
        { Response.Redirect("default.aspx"); } 
    }

    protected void DuQu_QuanXian_SheZhi()//显示、按钮权限设置
    {
        //Socut.Reader QuanXian = new Socut.Reader("SELECT * FROM DenLuBiao where DenLuYongHu = '" + Session["UserName"].ToString() + "'");
        Socut.Reader QuanXian = ShuJu.DuQu_JiLu_DengYu("DenLuBiao", "DenLuYongHu", Session["UserName"].ToString());
        if (QuanXian.Read())
        {
            if (QuanXian["QuanXian_all"].ToString() == "yes")
            {
                DuQu_QuanXian = "%"; if (Label7.Text == "") { Label7.Text = "站主管理"; }
            }
            else if (QuanXian["QuanXian"].ToString() == "yes")
            {
                DuQu_QuanXian = "%"; if (Label7.Text == "") { Label7.Text = "网站管理"; }
            }
            else if (DuQu_QuanXian == "*") 
            { 
                DuQu_QuanXian = Session["UserName"].ToString(); if (Label7.Text == "") { Label7.Text = "同修管理"; }
            }
        }
        QuanXian.Close();
    }

    protected void Button3_Click(object sender, EventArgs e)//计划日记完成
    {
        string quanxian = "yes";// string[] NeiRongs = new string[16];
        Control Shousuo_KJ = (Control)Master.FindControl("ContentPlaceHolder1");

        JianCa_ZuoYe();

        Socut.Reader drLogin = new Socut.Reader("SELECT * FROM DenLuBiao WHERE DenLuYongHu='" + Session["UserName"].ToString() + "' and Yan_zheng='" + quanxian + "'");
        if (drLogin.Read())//如果用户名正确
        {
            if (ZuoYeKz == true)
            {
                string[] XieRu_NeiRong = new string[8];
                string[] XieRu_ZiDuan = new string[] { "Kou_Ye", "Shen_Ye", "Yi_Ye", "Xun_Xi", "QiTa_ShuoMin", "JuShi_MinChen", "Ri_Qi", "Shi_Jian" };
                /*for (int i = 0; i < 16; i++)//获取勾选内容
                {
                    CheckBox CheckBoxs = (CheckBox)Shousuo_KJ.FindControl("CheckBox" + (i + 1).ToString());
                    if (CheckBoxs != null)
                    {
                        if (i <= 3)
                        { if (CheckBoxs.Checked == true) { XieRu_NeiRong[0] += CheckBoxs.Text + ","; } else { XieRu_NeiRong[0] += ","; } }
                        if (i > 3 && i <= 7)
                        { if (CheckBoxs.Checked == true) { XieRu_NeiRong[1] += CheckBoxs.Text + ","; } else { XieRu_NeiRong[1] += ","; } }
                        if (i > 7 && i <= 11)
                        { if (CheckBoxs.Checked == true) { XieRu_NeiRong[2] += CheckBoxs.Text + ","; } else { XieRu_NeiRong[2] += ","; } }
                        if (i > 11 && i <= 15)
                        { if (CheckBoxs.Checked == true) { XieRu_NeiRong[3] += CheckBoxs.Text + ","; } else { XieRu_NeiRong[3] += ","; } }
                    }
                }
                XieRu_NeiRong[0] = XieRu_NeiRong[0].Substring(0, XieRu_NeiRong[0].Length - 1);
                XieRu_NeiRong[1] = XieRu_NeiRong[1].Substring(0, XieRu_NeiRong[1].Length - 1);
                XieRu_NeiRong[2] = XieRu_NeiRong[2].Substring(0, XieRu_NeiRong[2].Length - 1);
                XieRu_NeiRong[3] = XieRu_NeiRong[3].Substring(0, XieRu_NeiRong[3].Length - 1);
                XieRu_NeiRong[4] = TextBox7.Text; 
                XieRu_NeiRong[5] = Session["UserName"].ToString();
                XieRu_NeiRong[6] = DropDownCalendar1.Value.ToString("d");
                XieRu_NeiRong[7] = StrTime;*/
                XieRu_NeiRong = HuoQu_GouXuan();//获取勾选内容
                ArrayList XieRuNeiRong = new ArrayList();
                XieRuNeiRong.Add("贤发"); XieRuNeiRong.Add("居士"); XieRuNeiRong.Add("贤发居士");
                //string[] PeiZhiXinXi = PeiZhi_XinXi.Split(new char[2] { '\r', '\n' });
                //Socut.Data.ExecuteScalar("INSERT INTO WanChenQinKuan (Kou_Ye,Shen_Ye,Yi_Ye,Xun_Xi,QiTa_ShuoMin,JuShi_MinChen,Ri_Qi,Shi_Jian) VALUES ('" + NeiRongs[0] + "," + NeiRongs[1] + "," + NeiRongs[2] + "," + NeiRongs[3] + "','" + NeiRongs[4] + "," + NeiRongs[5] + "," + NeiRongs[6] + "," + NeiRongs[7] + "','" + NeiRongs[8] + "," + NeiRongs[9] + "," + NeiRongs[10] + "," + NeiRongs[11] + "','" + NeiRongs[12] + "," + NeiRongs[13] + "," + NeiRongs[14] + "," + NeiRongs[15] + "','" + TextBox7.Text + "','" + Session["UserName"].ToString() + "','" + DropDownCalendar1.Value.ToString("d") + "','" + StrTime + "')");
                ShuJu.XieRu_JiLu("WanChenQinKuan", XieRu_ZiDuan, XieRu_NeiRong);
                Label7.Text = StrTime + "^_^您的日记提交成功!"; Label7.ForeColor = System.Drawing.Color.FromName("#FF0000");
            }
        }
        drLogin.Close();
        DaKai_RiJi();
        //Response.Write(Ts_XinXi.TiShiXinXi(StrTime + "^_^您的日记提交成功!"));
    }

    protected void JianCa_ZuoYe()//检查重复记录
    {
        //Socut.Reader JianCaZuoYe = new Socut.Reader("SELECT * FROM WanChenQinKuan where JuShi_MinChen = '" + Session["UserName"].ToString() + "'order by ZuoYe_id desc");
        Socut.Reader JianCaZuoYe = ShuJu.DuQu_JiLu_DengYu_JianXu("WanChenQinKuan", "JuShi_MinChen", Session["UserName"].ToString(), "ZuoYe_id");
        while (JianCaZuoYe.Read())
        {
            if (DropDownCalendar1.Value.ToString("d").ToString() == Convert.ToDateTime(JianCaZuoYe["Ri_Qi"].ToString()).ToShortDateString())
            { ZuoYeKz = false; break; }// else { ZuoYeKz = true; }
        }
        JianCaZuoYe.Close();
    }

    protected void Button4_Click(object sender, EventArgs e)//计划日记更新
    {
        int SHEBEI_ID = 0; string[] NeiRongs = new string[8];

        Control Shousuo_KJ = (Control)Master.FindControl("ContentPlaceHolder1");

        Socut.Reader GenXin = new Socut.Reader("SELECT TOP 1 * FROM WanChenQinKuan where JuShi_MinChen = '" + Session["UserName"].ToString() + "'order by ZuoYe_id desc");
        while (GenXin.Read())//循环读取最后一条ID
        { SHEBEI_ID = int.Parse(GenXin["ZuoYe_id"].ToString()); }
        GenXin.Close();
        if (SHEBEI_ID > 0)
        {
            NeiRongs = HuoQu_GouXuan();//获取勾选内容
            //DataSet myData = Socut.Data.ExecuteDataSet("UPDATE WanChenQinKuan SET Kou_Ye='" + NeiRongs[0] + "," + NeiRongs[1] + "," + NeiRongs[2] + "," + NeiRongs[3] + "',Shen_Ye='" + NeiRongs[4] + "," + NeiRongs[5] + "," + NeiRongs[6] + "," + NeiRongs[7] + "',Yi_Ye='" + NeiRongs[8] + "," + NeiRongs[9] + "," + NeiRongs[10] + "," + NeiRongs[11] + "',Xun_Xi='" + NeiRongs[12] + "," + NeiRongs[13] + "," + NeiRongs[14] + "," + NeiRongs[15] + "',QiTa_ShuoMin='" + TextBox7.Text + "',Ri_Qi='" + DropDownCalendar1.Value.ToString("d").ToString() + "',Shi_Jian='" + StrTime + "' WHERE ZuoYe_id=" + SHEBEI_ID + "");
            string[] XieRu_ZiDuan = new string[] { "Kou_Ye", "Shen_Ye", "Yi_Ye", "Xun_Xi", "QiTa_ShuoMin", "JuShi_MinChen", "Ri_Qi", "Shi_Jian" };
            for (int Gx = 0; Gx <= 8; Gx++)
            { ShuJu.GenXin_JiLu("WanChenQinKuan", XieRu_ZiDuan[Gx], NeiRongs[Gx], "ZuoYe_id", SHEBEI_ID); }
            Label7.Text = StrTime + "^_^您的日记更新成功!"; Label7.ForeColor = System.Drawing.Color.FromName("#FFFF00");
            Response.Write(Ts_XinXi.TiShiXinXi(StrTime + "^_^您的日记更新成功!"));
        }
        else { Label7.Text = StrTime + "(注意!!!没有找到您的日记存在记录...)"; Response.Write(Ts_XinXi.TiShiXinXi(StrTime + "^o^(注意!!!没有找到您的日记存在记录...)")); }
    }

    protected string[] HuoQu_GouXuan()//获取勾选内容
    {
        Control Shousuo_KJ = (Control)Master.FindControl("ContentPlaceHolder1");
        string[] Nei_Rong = new string[8];
        for (int i = 0; i < 16; i++)
        {
            CheckBox CheckBoxs = (CheckBox)Shousuo_KJ.FindControl("CheckBox" + (i + 1).ToString());
            if (CheckBoxs != null)
            {
                if (i <= 3)
                { if (CheckBoxs.Checked == true) { Nei_Rong[0] += CheckBoxs.Text + ","; } else { Nei_Rong[0] += ","; } }
                if (i > 3 && i <= 7)
                { if (CheckBoxs.Checked == true) { Nei_Rong[1] += CheckBoxs.Text + ","; } else { Nei_Rong[1] += ","; } }
                if (i > 7 && i <= 11)
                { if (CheckBoxs.Checked == true) { Nei_Rong[2] += CheckBoxs.Text + ","; } else { Nei_Rong[2] += ","; } }
                if (i > 11 && i <= 15)
                { if (CheckBoxs.Checked == true) { Nei_Rong[3] += CheckBoxs.Text + ","; } else { Nei_Rong[3] += ","; } }
            }
        }
        Nei_Rong[0] = Nei_Rong[0].Substring(0, Nei_Rong[0].Length - 1);
        Nei_Rong[1] = Nei_Rong[1].Substring(0, Nei_Rong[1].Length - 1);
        Nei_Rong[2] = Nei_Rong[2].Substring(0, Nei_Rong[2].Length - 1);
        Nei_Rong[3] = Nei_Rong[3].Substring(0, Nei_Rong[3].Length - 1);
        Nei_Rong[4] = TextBox7.Text;
        Nei_Rong[5] = Session["UserName"].ToString();
        Nei_Rong[6] = DropDownCalendar1.Value.ToString("d");
        Nei_Rong[7] = StrTime;
        return Nei_Rong;
    }

    protected void Button6_Click(object sender, EventArgs e)//计划日记返回
    { ShuaXin_JiHua(); MultiView1.ActiveViewIndex = 2; }

    protected void Button5_Click(object sender, EventArgs e)//计划日记重置
    {
        Control Shousuo_KJ = (Control)Master.FindControl("ContentPlaceHolder1");
        TextBox7.Text = "";
        for (int cb = 1; cb <= 16; cb++)
        {
            CheckBox CheckBoxs = (CheckBox)Shousuo_KJ.FindControl("CheckBox" + cb.ToString());
            if (CheckBoxs != null) { CheckBoxs.Checked = false; }
        }
    }

    protected void DataList4_ItemDataBound(object sender, DataListItemEventArgs e)//按钮控制
    {
        LinkButton LBut2 = (LinkButton)e.Item.FindControl("LinkButton2"); 
        LinkButton LBut3 = (LinkButton)e.Item.FindControl("LinkButton3");
        Socut.Reader QuanXian = new Socut.Reader("SELECT * FROM DenLuBiao where DenLuYongHu = '" + Session["UserName"].ToString() + "'");
        if (QuanXian.Read())
        {
            if (QuanXian["QuanXian_all"].ToString() == "yes")
            {
                if (LBut2 != null && LBut3 != null)
                { LBut2.Enabled = true; LBut3.Enabled = true; }
            }
            else if (QuanXian["QuanXian"].ToString() == "yes")
            {
                if (LBut2 != null && LBut3 != null)
                { LBut2.Enabled = true; LBut3.Enabled = false; }
            }
        }
        QuanXian.Close();
    }
    
    protected void DataList4_ItemCommand(object source, DataListCommandEventArgs e)//模板里面的按钮
    {
        if (Session["UserName"] != null)
        {
            if (e.CommandName == "PinYu_getID")
            {
                int Qu_ID = 0; string PinYu = "";
                LinkButton LBut2 = (LinkButton)DataList4.Items[0].FindControl("LinkButton2");
                if (LBut2 != null) { Qu_ID = Convert.ToInt16(e.CommandArgument.ToString()); }

                if (TextBox7.Text.Length > 0)
                {
                    PinYu += TextBox7.Text;//.Substring(KaiShi, ZhiShu);
                    PinYu += "[" + Session["UserName"].ToString() + StrTime + "]";
                    //DataSet myData = Socut.Data.ExecuteDataSet("UPDATE WanChenQinKuan SET Pin_YU='" + PinYu + "' WHERE ZuoYe_id=" + Qu_ID + "");
                    ShuJu.GenXin_JiLu("WanChenQinKuan", "Pin_YU", PinYu, "ZuoYe_id", Qu_ID);
                    Label7.Text = StrTime + "[^_^您,选择的日记[评语]成功!]"; Label7.ForeColor = System.Drawing.Color.FromName("#33CC33");
                    //Response.Write(Ts_XinXi.TiShiXinXi(StrTime + "[^_^您,选择的日记[评语]成功!]"));
                }
                DaKai_RiJi();
            }

            if (e.CommandName == "GuanLi_getID")
            {
                int Qu_ID = 0;
                LinkButton LBut3 = (LinkButton)DataList4.Items[0].FindControl("LinkButton3");
                if (LBut3 != null) { Qu_ID = Convert.ToInt16(e.CommandArgument.ToString()); }
                //DataSet myData = Socut.Data.ExecuteDataSet("DELETE FROM WanChenQinKuan WHERE ZuoYe_id=" + Qu_ID + "");
                ShuJu.ShuanChu_JiLu("WanChenQinKuan", "ZuoYe_id", Qu_ID);
                Label7.Text = StrTime + "[^o^您,选择[删除]操作成功!]";
                //Response.Write(Ts_XinXi.TiShiXinXi(StrTime + "[^_^您,选择[删除]操作成功!]"));
                DaKai_RiJi();
            }

            if (e.CommandName == "GongKai_getID")
            {
                int Qu_ID = 0; bool GongKai = false;

                CheckBox CkBox17 = (CheckBox)DataList4.Items[0].FindControl("CheckBox17");
                if (CkBox17 != null)
                { Qu_ID = Convert.ToInt16(e.CommandArgument.ToString()); }

                LinkButton LBut4 = new LinkButton();
                if (LBut4 != null)
                {
                    LBut4 = (LinkButton)e.CommandSource;
                    GongKai = Convert.ToBoolean(LBut4.ToolTip.Substring(0, LBut4.ToolTip.Length - 20));
                    if (GongKai == false) { GongKai = true; } else { GongKai = false; }
                }

                //DataSet myData = Socut.Data.ExecuteDataSet("UPDATE WanChenQinKuan SET Gong_Kai=" + Convert.ToBoolean(GongKai) + " WHERE ZuoYe_id=" + Qu_ID + "");
                ShuJu.GenXin_JiLu_BuEr("WanChenQinKuan", "Gong_Kai", Convert.ToBoolean(GongKai), "ZuoYe_id", Qu_ID);
                if (GongKai == true)
                { Label7.Text = StrTime + "^_^[您的日记(设置[公开])成功!]"; Label7.ForeColor = System.Drawing.Color.FromName("#33CC33"); }
                else { Label7.Text = StrTime + "[^_^您的日记(取消[公开])成功!]"; }//Response.Write(Ts_XinXi.TiShiXinXi(StrTime + "[^_^您的日记(取消[公开])成功!]"));
                DaKai_RiJi();
            }
        }
        else
        { Response.Redirect("default.aspx"); }
    }


    private void FenLei_LieBiao()//分类列表XianCe_ChuanJian_Ren
    {
        DropDownList1.Items.Clear();//DropDownList1.Items.Add(Session["UserName"].ToString());
        //Socut.Reader FenLei = new Socut.Reader("SELECT * FROM Fo_Xian WHERE ChuanJian_Ren like '%" + "%" + "%'");
        Socut.Reader FenLei = ShuJu.DuQu_JiLu_QuanMoHu("Fo_Xian","ChuanJian_Ren","%");
        while (FenLei.Read())
        {
            int n = DropDownList1.Items.Count; bool kg = false;
            string d_FenLei = FenLei["Zhuan_Ti"].ToString();
            for (int i = 0; i <= n - 1; i++)
            {
                string d_flb = DropDownList1.Items[i].Value;
                if (d_flb == d_FenLei)
                { kg = true; break; }
            }
            if (kg == false) { DropDownList1.Items.Add(d_FenLei); }
        }
        FenLei.Close();
    }

    private void MinCheng_LieBiao()//名称列表
    {
        DropDownList2.Items.Clear();
        //Socut.Reader MinCheng = new Socut.Reader("SELECT * FROM Fo_Xian WHERE ChuanJian_Ren like '%" + "%" + "%'");
        Socut.Reader MinCheng = ShuJu.DuQu_JiLu_QuanMoHu("Fo_Xian", "ChuanJian_Ren", "%");
        while (MinCheng.Read())
        {
            int nn = DropDownList2.Items.Count; bool kg = false;
            string d_MinCheng = MinCheng["Ming_Cheng"].ToString();
            for (int ii = 0; ii <= nn - 1; ii++)
            {
                string d_mlb = DropDownList2.Items[ii].Value;
                if (d_mlb == d_MinCheng)
                { kg = true; break; }
            }
            if (kg == false && d_MinCheng != "") { DropDownList2.Items.Add(d_MinCheng); }
        }
        MinCheng.Close();
    }

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值