???伴〉??
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TeachingPlan.aspx.cs" Inherits="WebUI.TeachingManagement.TeachingPlan" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
? ? <title>??瀛??″??</title>
? ? <link href="../CSS/Stylesheet.css" target="_blank" rel="external nofollow" rel="stylesheet" type="text/css" />
? ? <script src="../JScript/MainUI.js" type="text/javascript" language="javascript" charset="GB2312"></script>
? ? <script src="../JScript/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
? ? <script src="../JScript/jquery-1.5.js" type="text/javascript" language="javascript"></script>
? ? <script type="text/javascript" src="../JScript/j.suggest.js"></script>
</head>
<body>
? ? <form id="form1" runat="server">
? ? <div>
? ? ? ? <table width="100%" cellspacing="0" cellpadding="0" class="border">
? ? ? ? ? ? <tr class="TitleBarStyle">
? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? <!--??琛ㄥご-->
? ? ? ? ? ? ? ? ? ? <table width="100%" cellpadding="0" cellspacing="0">
? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td style='width: 17px'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/dot01.gif" style='margin-left: 4px' />
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td 慰nclick="boxCollapsible('ListBox3','ListImg3')" style="cursor: hand;">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <span style='font-weight: bold; color: #333; font-size: 12px'>??瀛??″??淇℃???ヨ??lt;/span>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td style='width: 18px'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img id='ListImg3' alt='?剧ず/????' src='../Images/collapse.jpg' style='cursor: hand;'
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 慰nclick="boxCollapsible('ListBox3','ListImg3')" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? ? ? <%--??琛ㄥご缁???--%>
? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? </tr>
? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? <td id="ListBox3" style="display: none;">
? ? ? ? ? ? ? ? ? ? <!--宸ュ?锋??-->
? ? ? ? ? ? ? ? ? ? <div class="ToolBar">
? ? ? ? ? ? ? ? ? ? ? ? <table width="100%" cellspacing="0" cellpadding="0">
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr height="25">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="18">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/I_GWCX.gif" width="16" height="16" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="50">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:LinkButton ID="lnkSearch" runat="server" OnClick="lnkSearch_Click">?ц??ヨ??lt;/asp:LinkButton>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="18">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/I005.gif" width="16" height="16" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="50">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:LinkButton ID="lnkShowAll" runat="server" OnClick="lnkShowAll_Click">?剧ず?ㄩ??lt;/asp:LinkButton>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? ? ? </div>
? ? ? ? ? ? ? ? ? ? <div style="font-size: 12px;">
? ? ? ? ? ? ? ? ? ? ? ? <table width="90%" cellspacing="0" cellpadding="0" class="form-table"
? ? ? ? ? ? ? ? ? ? ? ? ? ? align="center">
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 骞寸骇
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlGrade" runat="server" Width="100px" OnSelectedIndexChanged="ddlGrade_SelectedIndexChanged"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? AutoPostBack="true">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 璇剧?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlCourse" runat="server" Width="100px">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 瀛?勾
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlSchoolYear" runat="server" Width="120px" CssClass="TextBoxStyle">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 瀛???
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlSchoolTerm" runat="server" Width="100px">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:ListItem Value="-1">-----璇烽????----</asp:ListItem>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:ListItem Value="1">绗?涓?瀛???</asp:ListItem>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:ListItem Value="2">绗?浜?瀛???</asp:ListItem>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <%--<td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ????锛???涓???????锛?娴?璇?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:TextBox ID="txtUnit" runat="server" Width="100px"></asp:TextBox>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>--%>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? ? ? </div>
? ? ? ? </table>
? ? ? ? <%--END琛ㄦ?煎?哄??--%>
? ? ? ? <%--琛ㄦ?煎?哄??--%>
? ? ? ? <table width="100%" cellspacing="0" cellpadding="0" class="border">
? ? ? ? ? ? <tr class="TitleBarStyle">
? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? <!--??琛ㄥご-->
? ? ? ? ? ? ? ? ? ? <table width="100%" cellpadding="0" cellspacing="0">
? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td style='width: 17px'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/dot01.gif" style='margin-left: 4px' alt="" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td 慰nclick="boxCollapsible('ListBox1','ListImg1')" style="cursor: hand;">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <span style='font-weight: bold; color: #333; font-size: 12px'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:Label ID="lbtp" runat="server" ></asp:Label>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??瀛??″??淇℃????琛?lt;/span>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <%--<td>2014????2015瀛?勾 绗?涓?瀛??? 涓?骞寸骇 ?璇?????瀛??″??琛?lt;/td>--%>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td style='width: 18px'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img id='ListImg1' alt='?剧ず/????' src='../Images/collapse.jpg' style='cursor: hand;'
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 慰nclick="boxCollapsible('ListBox1','ListImg1')" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? </tr>
? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? <td id="ListBox1">
? ? ? ? ? ? ? ? ? ? <!--宸ュ?锋??-->
? ? ? ? ? ? ? ? ? ? <div class="ToolBar">
? ? ? ? ? ? ? ? ? ? ? ? <table width="100%" cellspacing="0" cellpadding="0">
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr height="25">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="10">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2" alt="" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="18">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/I003.gif" width="16" height="16" alt="" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="80">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:LinkButton ID="lnkNew" runat="server" OnClick="lnkNew_Click">娣诲????瀛??″??</asp:LinkButton>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2" alt="" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="18">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/I004.gif" width="16" height="16" alt="" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="80">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:LinkButton ID="lnkDel" runat="server" OnClientClick="{return confirm('纭?瀹????ゆ???????');}"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OnClick="lnkDel_Click">???ゆ??瀛??″??</asp:LinkButton>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2" alt="" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? ? ? </div>
? ? ? ? ? ? ? ? ? ? <div style="font-size: 12px;">
? ? ? ? ? ? ? ? ? ? ? ? <asp:GridView ID="GridView1" runat="server" BackColor="#F1F1F1" Width="100%" BorderColor="#F1F1F1"
? ? ? ? ? ? ? ? ? ? ? ? ? ? BorderWidth="0px" CellPadding="4" ForeColor="Black" AutoGenerateColumns="False"
? ? ? ? ? ? ? ? ? ? ? ? ? ? OnRowDataBound="GridView1_RowDataBound" OnPageIndexChanging="GridView1_PageIndexChanging"
? ? ? ? ? ? ? ? ? ? ? ? ? ? OnSorting="GridView1_Sorting" OnRowEditing="GridView1_RowEditing" DataKeyNames="Id" EmptyDataText="No Data" PageSize="20"
? ? ? ? ? ? ? ? ? ? ? ? ? ? AllowPaging="True" AllowSorting="True" >
? ? ? ? ? ? ? ? ? ? ? ? ? ? <FooterStyle BackColor="#F1F1F1" Font-Size="12px" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? <RowStyle BackColor="#F1F1F1" Font-Size="12px" HorizontalAlign="Center" VerticalAlign="Middle" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? <PagerStyle BackColor="#F1F3F2" ForeColor="Black" HorizontalAlign="Center" CssClass="PagerCss" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? <SelectedRowStyle BackColor="#E0ECFC" Font-Bold="True" ForeColor="Black" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? <HeaderStyle BackColor="#F1F3F2" Font-Bold="True" Font-Size="12px" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? <EmptyDataRowStyle Font-Size="12px" HorizontalAlign="Center" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? <Columns>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:TemplateField>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <HeaderTemplate>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="checkbox" id="Check" 慰nclick="CheckAll(this)" title="?ㄩ??/?ㄤ???" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </HeaderTemplate>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <ItemTemplate>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:CheckBox ID="CheckRow" runat="server" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </ItemTemplate>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <HeaderStyle Width="20px" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:TemplateField>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:BoundField DataField="Week" HeaderText="?ㄦ?? SortExpression="Week">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <ItemStyle HorizontalAlign="Left" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:BoundField>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:BoundField DataField="Chapter" HeaderText="绔???" SortExpression="Chapter">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <ItemStyle HorizontalAlign="Left" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:BoundField>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:TemplateField SortExpression="Content">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <ItemTemplate>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <a href="#" target="_blank" rel="external nofollow" style="font-size: 12px;" title='<%#Eval("Content").ToString() %>'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <%#getMyStr(Eval("Content").ToString(),80)%>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </a>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </ItemTemplate>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <ItemStyle HorizontalAlign="Left" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:TemplateField>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:BoundField DataField="TeachinMmethods" HeaderText="??璇炬?瑰?" SortExpression="TeachinMmethods">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <ItemStyle HorizontalAlign="Left" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:BoundField>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:ButtonField CommandName="Edit" Text="淇??? HeaderText="??浣?" ItemStyle-HorizontalAlign="Center">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:ButtonField>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </Columns>
? ? ? ? ? ? ? ? ? ? ? ? </asp:GridView>
? ? ? ? ? ? ? ? ? ? </div>
? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? </tr>
? ? ? ? </table>
? ? ? ? <%--end琛ㄦ?煎?哄??--%>
? ? ? ? <%--琛ㄦ?煎?哄??--%>
? ? ? ? <table width="100%" cellspacing="0" cellpadding="0" class="border">
? ? ? ? ? ? <tr class="TitleBarStyle">
? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? <!--??琛ㄥご-->
? ? ? ? ? ? ? ? ? ? <table width="100%" cellpadding="0" cellspacing="0">
? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td style='width: 17px'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/dot01.gif" style='margin-left: 4px' />
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td 慰nclick="boxCollapsible('ListBox2','ListImg2')" style="cursor: hand;">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <span style='font-weight: bold; color: #333; font-size: 12px'>??瀛??″??淇℃??缂?杈?</span>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <td style='width: 18px'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img id='ListImg2' alt='?剧ず/????' src='../Images/collapse.jpg' style='cursor: hand;'
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 慰nclick="boxCollapsible('ListBox2','ListImg2')" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? </tr>
? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? <td id="ListBox2">
? ? ? ? ? ? ? ? ? ? <!--宸ュ?锋??-->
? ? ? ? ? ? ? ? ? ? <div class="ToolBar">
? ? ? ? ? ? ? ? ? ? ? ? <table width="100%" cellspacing="0" cellpadding="0">
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr height="25">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="18">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img src="../Images/opt02.gif" width="13" height="12" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="50">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:LinkButton ID="lnkSave" runat="server" OnClick="lnkSave_Click">娣诲??纭?璁?lt;/asp:LinkButton>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <img height="13" src="../images/grid-split.gif" width="2">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? ? ? </div>
? ? ? ? ? ? ? ? ? ? <div style="margin: 12px 12px 0px 12px;">
? ? ? ? ? ? ? ? ? ? ? ? <table width="75%" cellpadding="0" cellspacing="3" class="form-table"
? ? ? ? ? ? ? ? ? ? ? ? ? ? style="font-size: 12px;" align="center">
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 骞寸骇
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlGrade1" runat="server" Width="180px" OnSelectedIndexChanged="ddlGrade1_SelectedIndexChanged"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? AutoPostBack="true">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 璇剧???绉? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlCourse1" runat="server" Width="180px">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 瀛?勾
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlSchoolYear1" runat="server" Width="180px" CssClass="TextBoxStyle">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 瀛???
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:DropDownList ID="ddlSchoolTerm1" runat="server" Width="180px">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:ListItem Value="-1">-----璇烽????----</asp:ListItem>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:ListItem Value="1">绗?涓?瀛???</asp:ListItem>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:ListItem Value="2">绗?浜?瀛???</asp:ListItem>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </asp:DropDownList>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ㄦ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:TextBox ID="txtWeek" runat="server" CssClass="TextBoxStyle " Width="180px"></asp:TextBox>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 绔???
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:TextBox ID="txtChapter" runat="server" CssClass="TextBoxStyle " Width="180px"></asp:TextBox>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="right">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??璇炬?瑰?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:TextBox ID="txtTM" runat="server" CssClass="TextBoxStyle " Width="180px"></asp:TextBox>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??璇惧??瀹? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td align="left">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <asp:TextBox ID="txtContent" runat="server" CssClass="TextBoxStyle " Width="180px"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TextMode="MultiLine"></asp:TextBox>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>
? ? ? ? ? ? ? ? ? ? ? ? </table>
? ? ? ? ? ? ? ? ? ? </div>
? ? ? ? ? ? ? ? </td>
? ? ? ? ? ? </tr>
? ? ? ? </table>
? ? ? ? <%--end琛ㄦ?煎?哄??--%>
? ? ? ? <asp:HiddenField ID="hdfId" runat="server" />
? ? </div>
? ? </form>
</body>
</html>
???颁唬??锛?
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 Entity.SysManager;
using Business.SysManager;
using Commons;
using MySql.Data.MySqlClient;
using Business.OA;
namespace WebUI.TeachingManagement
{
? ? public partial class TeachingPlan : System.Web.UI.Page
? ? {
? ? ? ? public UserBusi ub = new UserBusi();
? ? ? ? public UserEntity user = new UserEntity();
? ? ? ? protected void Page_Load(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? #region ?ㄦ?风?诲?淇℃??楠?璇?
? ? ? ? ? ? this.Page.Title = System.Configuration.ConfigurationManager.AppSettings["PageTitle"];
? ? ? ? ? ? UserBusi userBusi = new UserBusi();
? ? ? ? ? ? if (!userBusi.IsExistSession(ref user))
? ? ? ? ? ? {
? ? ? ? ? ? ? ? DbTools.MsgAndParentRedirect("璇烽???扮?诲?锛?", "../Default.aspx");
? ? ? ? ? ? ? ? return;
? ? ? ? ? ? }
? ? ? ? ? ? #endregion
? ? ? ? ? ? if (!IsPostBack)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? BindSchoolYear();//缁?瀹?瀛?勾
? ? ? ? ? ? ? ? TeacherBusi teaBusi = new TeacherBusi();
? ? ? ? ? ? ? ? DataTable dt = getBoardTable("Grade", "t_teachingplan", "Grade<=9");
? ? ? ? ? ? ? ? dt.Columns.Add("GradeChn", typeof(System.String));//?ㄦ?峰???
? ? ? ? ? ? ? ? for (int i = 0; i < dt.Rows.Count; i++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? DataRow dr = dt.Rows[i];
? ? ? ? ? ? ? ? ? ? dr["GradeChn"] = teaBusi.ChangeGrade(dr["Grade"].ToString());
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ddlGrade.DataSource = dt.DefaultView;
? ? ? ? ? ? ? ? ddlGrade.DataTextField = "GradeChn";
? ? ? ? ? ? ? ? ddlGrade.DataValueField = "Grade";
? ? ? ? ? ? ? ? ddlGrade.DataBind();
? ? ? ? ? ? ? ? string sql = "select * from t_teachingplan where Course like '%" + ddlGrade.SelectedValue + "'";
? ? ? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? ? ? DataSet ds = comm.GetDataSet(sql);
? ? ? ? ? ? ? ? if (ds.Tables[0].Rows.Count > 0)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? DataRow dr = ds.Tables[0].Rows[0];
? ? ? ? ? ? ? ? ? ? string course=dr["Course"].ToString();
? ? ? ? ? ? ? ? ? ? //??璇剧?缂??疯浆????璇剧???瀛?
? ? ? ? ? ? ? ? ? ? sql = "select * from tm_course where CourseCode='" + course + "' ";
? ? ? ? ? ? ? ? ? ? ds = comm.GetDataSet(sql);
? ? ? ? ? ? ? ? ? ? ddlCourse.DataSource = ds.Tables[0].DefaultView;
? ? ? ? ? ? ? ? ? ? ddlCourse.DataTextField = "CourseName";
? ? ? ? ? ? ? ? ? ? ddlCourse.DataValueField = "CourseCode";
? ? ? ? ? ? ? ? ? ? ddlCourse.DataBind();
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? BindSchoolYear1();//缁?瀹?瀛?勾1
? ? ? ? ? ? ? ? dt = getBoardTable("Grade", "c_gradeclassinfo", "Grade<=9");
? ? ? ? ? ? ? ? dt.Columns.Add("GradeChn", typeof(System.String));//?ㄦ?峰???
? ? ? ? ? ? ? ? for (int i = 0; i < dt.Rows.Count; i++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? DataRow dr = dt.Rows[i];
? ? ? ? ? ? ? ? ? ? dr["GradeChn"] = teaBusi.ChangeGrade(dr["Grade"].ToString());
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ddlGrade1.DataSource = dt.DefaultView;
? ? ? ? ? ? ? ? ddlGrade1.DataTextField = "GradeChn";
? ? ? ? ? ? ? ? ddlGrade1.DataValueField = "Grade";
? ? ? ? ? ? ? ? ddlGrade1.DataBind();
? ? ? ? ? ? ? ? sql = "select * from tm_course where CourseCode like '%" + ddlGrade1.SelectedValue + "'";
? ? ? ? ? ? ? ? ds = comm.GetDataSet(sql);
? ? ? ? ? ? ? ? ddlCourse1.DataSource = ds.Tables[0].DefaultView;
? ? ? ? ? ? ? ? ddlCourse1.DataTextField = "CourseName";
? ? ? ? ? ? ? ? ddlCourse1.DataValueField = "CourseCode";
? ? ? ? ? ? ? ? ddlCourse1.DataBind();
? ? ? ? ? ? ? ? #region 璁剧疆??搴???榛?璁ゅ??娈? ? ? ? ? ? ? ? ? ViewState["SortOrder"] = "Id";
? ? ? ? ? ? ? ? ViewState["OrderDire"] = "asc";
? ? ? ? ? ? ? ? #endregion
? ? ? ? ? ? ? ? ViewState["Searcher"] = " 1=1 ";
? ? ? ? ? ? ? ? GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? ? ? ? ? //??濮???娣诲???ㄦ?蜂俊??
? ? ? ? ? ?
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? #region 缁?瀹?瀛?勾淇℃??
? ? ? ? private void BindSchoolYear()
? ? ? ? {
? ? ? ? ? ? int NowYear = DateTime.Now.Year;
? ? ? ? ? ? for (int IntYear = NowYear - 5; IntYear <= NowYear; IntYear++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? string StrText = IntYear.ToString() + "-" + (IntYear + 1).ToString();
? ? ? ? ? ? ? ? ddlSchoolYear.Items.Add(new ListItem(StrText, IntYear.ToString()));
? ? ? ? ? ? }
? ? ? ? ? ? if (DateTime.Now.Month >= 8)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ddlSchoolYear.SelectedValue = NowYear.ToString();
? ? ? ? ? ? ? ? ddlSchoolTerm.SelectedValue = "1";
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ddlSchoolYear.SelectedValue = (NowYear - 1).ToString();
? ? ? ? ? ? ? ? ddlSchoolTerm.SelectedValue = "2";
? ? ? ? ? ? }
? ? ? ? ? ? newInit();
? ? ? ? }
? ? ? ? private void BindSchoolYear1()
? ? ? ? {
? ? ? ? ? ? int NowYear = DateTime.Now.Year;
? ? ? ? ? ? for (int IntYear = NowYear - 5; IntYear <= NowYear; IntYear++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? string StrText = IntYear.ToString() + "-" + (IntYear + 1).ToString();
? ? ? ? ? ? ? ? ddlSchoolYear1.Items.Add(new ListItem(StrText, IntYear.ToString()));
? ? ? ? ? ? }
? ? ? ? ? ? if (DateTime.Now.Month >= 8)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ddlSchoolYear1.SelectedValue = NowYear.ToString();
? ? ? ? ? ? ? ? ddlSchoolTerm1.SelectedValue = "1";
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ddlSchoolYear1.SelectedValue = (NowYear - 1).ToString();
? ? ? ? ? ? ? ? ddlSchoolTerm1.SelectedValue = "2";
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region getBoardTable: 璇诲??Board?版??琛??寰???ataTable
? ? ? ? /// <summary>
? ? ? ? /// 璇诲??S_BoardInfo?版??琛? ? ? ? ? /// </summary>
? ? ? ? /// <returns></returns>
? ? ? ? private DataTable getBoardTable(string field, string table, string condition)
? ? ? ? {
? ? ? ? ? ? DataTable dtBoard;
? ? ? ? ? ? string sql = "select distinct {0} from {1} where {2} order by {0}";
? ? ? ? ? ? sql = string.Format(sql, field, table, condition);
? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? dtBoard = comm.GetDataSet(sql).Tables[0];
? ? ? ? ? ? return dtBoard;
? ? ? ? }
? ? ? ? #endregion
? ? ? ? protected void ddlGrade_SelectedIndexChanged(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? TeacherBusi teaBusi = new TeacherBusi();
? ? ? ? ? ? string sql = "select * from t_teachingplan where Course like '%" + ddlGrade.SelectedValue + "'";
? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? DataSet ds = comm.GetDataSet(sql);
? ? ? ? ? ? ddlCourse.DataSource = ds.Tables[0].DefaultView;
? ? ? ? ? ? ddlCourse.DataTextField = "Course";
? ? ? ? ? ? ddlCourse.DataValueField = "Course";
? ? ? ? ? ? ddlCourse.DataBind();
? ? ? ? }
? ? ? ? protected void ddlGrade1_SelectedIndexChanged(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? TeacherBusi teaBusi = new TeacherBusi();
? ? ? ? ? ? string sql = "select * from tm_course where CourseCode like '%" + ddlGrade1.SelectedValue + "'";
? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? DataSet ds = comm.GetDataSet(sql);
? ? ? ? ? ? ddlCourse1.DataSource = ds.Tables[0].DefaultView;
? ? ? ? ? ? ddlCourse1.DataTextField = "CourseName";
? ? ? ? ? ? ddlCourse1.DataValueField = "CourseCode";
? ? ? ? ? ? ddlCourse1.DataBind();
? ? ? ? }
? ? ? ? #region GridView?版??缁?瀹?浜?浠? ? ? ? ? /// <summary>
? ? ? ? /// GridView?版??缁?瀹?浜?浠? ? ? ? ? /// </summary>
? ? ? ? private void GridViewBind(string condition)
? ? ? ? {
? ? ? ? ? ? string sql;
? ? ? ? ? ? sql = "select * from `t_teachingplan` where {0} order by Id ";
? ? ? ? ? ? sql = string.Format(sql, condition);
? ? ? ? ? ? Common comm = new Common();
? ? ?
? ? ? ? ? ? #region ??椤垫?т欢瀵瑰?浠g??
? ? ? ? ? ? DataTable dt = comm.GetDataSet(sql).Tables[0];
? ? ? ? ? ?// AspNetPager1.RecordCount = dt.Rows.Count;
? ? ? ? ? ?// DataSet ds = comm.GetDataSet(sql, AspNetPager1.StartRecordIndex - 1, AspNetPager1.PageSize);
? ? ? ? ? ? #endregion
? ? ? ? ? ? #region
? ? ? ? ? ? //if (dt.Rows.Count>0)
? ? ? ? ? ? //{
? ? ? ? ? ? // ? DataRow dr=dt.Rows[0];
? ? ? ? ? ? // ? lbtp.Text=dr["SchoolYear"].ToString()+dr["SchoolTerm"].ToString()+dr["Grade"].ToString()+dr["Course"].ToString();
? ? ? ? ? ? //}
? ? ? ? ? ? #endregion
? ? ? ? ? ? #region 瀹??板???诲????棰???搴?瑕??ㄥ?扮??浠g??
? ? ? ? ? ? DataView myView = dt.DefaultView;
? ? ? ? ? ? string sort = (string)ViewState["SortOrder"] + " " + (string)ViewState["OrderDire"];
? ? ? ? ? ? myView.Sort = sort;
? ? ? ? ? ? #endregion
? ? ? ? ? ?GridView1.DataSource = dt.DefaultView;
? ? ? ? ? ? GridView1.DataBind();
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ??椤垫?т欢????椤典?浠? ? ? ? ? protected void AspNetPager1_PageChanged(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ?ㄥ???绘??涓??ㄤ?瀵瑰??杩?琛???搴?
? ? ? ? /// <summary>
? ? ? ? /// ?ㄥ???绘??涓??ㄤ?瀵瑰??杩?琛???搴???瓒??炬?ユ?跺????锛?浣???GridView ?т欢?ц???搴???浣?涔?????姝や?浠堕??甯哥?ㄤ???娑???搴???浣????ц???瀹?涔?????搴?渚?绋???
? ? ? ? /// </summary>
? ? ? ? /// <param name="sender"></param>
? ? ? ? /// <param name="e"></param>
? ? ? ? protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
? ? ? ? {
? ? ? ? ? ? string sPage = e.SortExpression;
? ? ? ? ? ? if (ViewState["SortOrder"].ToString() == sPage)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? if (ViewState["OrderDire"].ToString() == "DESC")
? ? ? ? ? ? ? ? ? ? ViewState["OrderDire"] = "ASC";
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? ViewState["OrderDire"] = "DESC";
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ViewState["SortOrder"] = e.SortExpression;
? ? ? ? ? ? }
? ? ? ? ? ? GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ????昏??????┿??榧???棰??插??????琛?缂?杈????㈤〉????娑?琛?缂?杈??????╄?缂?杈?
? ? ? ? /// <summary>
? ? ? ? /// 浠???render瀹??板???婚???╄?
? ? ? ? /// </summary>
? ? ? ? /// <param name="writer"></param>
? ? ? ? protected override void Render(HtmlTextWriter writer)
? ? ? ? {
? ? ? ? ? ? foreach (GridViewRow row in GridView1.Rows)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? if (row.RowType == DataControlRowType.DataRow)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? row.Attributes["ondblclick"] = ClientScript.GetPostBackEventReference(GridView1, "Select$" + row.RowIndex.ToString(), true);
? ? ? ? ? ? ? ? ? ? row.Attributes["style"] = "cursor:pointer";
? ? ? ? ? ? ? ? ? ? row.Attributes["title"] = "???荤?杈?";
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? base.Render(writer);
? ? ? ? }
? ? ? ? protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
? ? ? ? {
? ? ? ? ? ? if (e.Row.RowType == DataControlRowType.DataRow)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? e.Row.Attributes["style"] = "Cursor:hand";
? ? ? ? ? ? ? ? e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='#c8dafa'");
? ? ? ? ? ? ? ? e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
? ? ? ? {
? ? ? ? ? ? GridView1.PageIndex = e.NewPageIndex;
? ? ? ? ? ? GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? }
? ? ? ? protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? EditGridView();
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ???ヨ?板???濮???
? ? ? ? /// <summary>
? ? ? ? /// ???ヨ?板???濮???
? ? ? ? /// </summary>
? ? ? ?private void newInit()
? ? ? ?{
? ? ? ? // ? ?txtPersonName.Text = string.Empty;
? ? ? ? // ? ?txtTestName.Text = string.Empty;
? ? ? ? ? ?lnkSave.Text = "娣诲??纭?璁?; //?存?规??????棰?澶?浜?娣诲???舵??
? ? ? ? ? ?// GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ???よ?板???娣诲???拌?板? ????浜?浠? ? ? ? ? protected void lnkDel_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? foreach (GridViewRow row in this.GridView1.Rows)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? CheckBox CheckRow = (CheckBox)row.FindControl("CheckRow");
? ? ? ? ? ? ? ? if (CheckRow.Checked)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? string id = GridView1.DataKeys[row.RowIndex].Value.ToString();
? ? ? ? ? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? ? ? ? ? comm.ExecuteNonQuery("delete from `t_teachingplan` where Id=" + id);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ?
? ? ? ? }
? ? ? ? protected void lnkNew_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? ?newInit();
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region 缂?杈?澶????芥?? ? ? ? ? /// <summary>
? ? ? ? /// 缂?杈?澶????芥?? ? ? ? ? /// </summary>
? ? ? ? private void EditGridView()
? ? ? ? {
? ? ? ? ? ? //string ID = GridView1.DataKeys[GridView1.SelectedIndex].Value.ToString();
? ? ? ? ? ? string ID=GridView1.DataKeys[GridView1.EditIndex].Value.ToString();
? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? string sql = "select * from `t_teachingplan` where `Id`=" + ID;
? ? ? ? ? ? DataSet ds = comm.GetDataSet(sql);
? ? ? ? ? ? if (ds.Tables[0].Rows.Count > 0)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? DataRow dr = ds.Tables[0].Rows[0];
? ? ? ? ? ? ? ? newInit();
? ? ? ? ? ? ? ? //?抽??瀛?娈碉?纭?瀹?涓?涓???瀛??″??
? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ddlCourse1.SelectedValue = dr["Course"].ToString();
? ? ? ? ? ? ? ? ddlGrade1.SelectedValue = dr["Grade"].ToString();
? ? ? ? ? ? ? ? ddlSchoolTerm1.SelectedValue = dr["SchoolTerm"].ToString();
? ? ? ? ? ? ? ? ddlSchoolYear1.SelectedValue = dr["SchoolYear"].ToString();
? ? ? ? ? ? ? ? //??瀛??″????瀹? ? ? ? ? ? ? ? ? txtChapter.Text = dr["Chapter"].ToString();
? ? ? ? ? ? ? ? txtContent.Text = dr["Content"].ToString();
? ? ? ? ? ? ? ? txtTM.Text = dr["TeachinMmethods"].ToString();
? ? ? ? ? ? ? ? txtWeek.Text = dr["Week"].ToString();
? ? ? ? ? ? ? ? //ddlSubmit.SelectedValue = dr["Submit"].ToString();
? ? ? ? ? ? ? ? hdfId.Value = dr["Id"].ToString();
? ? ? ? ? ? ? ? lnkSave.Text = "淇?瀛?淇???;//?瑰??????????绉?? ??
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ?ㄦ?蜂俊??娣诲????淇??? ? ? ? ? protected void lnkSave_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? if (lnkSave.Text == "娣诲??纭?璁?)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? string sql = "select * from t_teachingplan";
? ? ? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? ? ? DataSet ds = comm.GetDataSet(sql);
? ? ? ? ? ? ? ? DataTable dt = ds.Tables[0];
? ? ? ? ? ? ? ? DataRow dr = dt.NewRow();
? ? ? ? ? ? ? ? SetDataRowValue(ref dr);
? ? ? ? ? ? ? ? dt.Rows.Add(dr);
? ? ? ? ? ? ? ? comm.InitComm();
? ? ? ? ? ? ? ? MySqlDataAdapter adp = comm.GetAdapter(sql);
? ? ? ? ? ? ? ? MySqlCommandBuilder comB = new MySqlCommandBuilder(adp);
? ? ? ? ? ? ? ? if (adp.Update(ds, "ds") > 0)
? ? ? ? ? ? ? ? ? ? DbTools.MsgBox("娣诲??璁板?????锛?");
? ? ? ? ? ? ? ? ds.AcceptChanges();
? ? ? ? ? ? ? ? newInit();
? ? ? ? ? ? }
? ? ? ? ? ? if (lnkSave.Text == "淇?瀛?淇???)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? string sql = "select * from t_teachingplan where Id=" + hdfId.Value;
? ? ? ? ? ? ? ? Common comm = new Common();
? ? ? ? ? ? ? ? DataSet ds = comm.GetDataSet(sql);
? ? ? ? ? ? ? ? DataTable dt = ds.Tables[0];
? ? ? ? ? ? ? ? DataRow dr = dt.Rows[0];
? ? ? ? ? ? ? ? SetDataRowValue(ref dr);
? ? ? ? ? ? ? ? comm.InitComm();
? ? ? ? ? ? ? ? MySqlDataAdapter adp = comm.GetAdapter(sql);
? ? ? ? ? ? ? ? MySqlCommandBuilder comB = new MySqlCommandBuilder(adp);
? ? ? ? ? ? ? ? if (adp.Update(ds, "ds") > 0)
? ? ? ? ? ? ? ? ? ? DbTools.MsgBox("淇℃??淇??规????锛?");
? ? ? ? ? ? ? ? ds.AcceptChanges();
? ? ? ? ? ? ? ? GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? ? ? ? ? EditGridView();
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? /// <summary>
? ? ? ? /// 缁?DataRow璧??? ? ? ? ? /// </summary>
? ? ? ? /// <param name="dr"></param>
? ? ? ? private void SetDataRowValue(ref DataRow dr)
? ? ? ? {
? ? ? ? ? ??
? ? ? ? ? ? dr["SchoolTerm"] = ddlSchoolTerm1.SelectedValue;
? ? ? ? ? ? dr["SchoolYear"] = ddlSchoolYear1.SelectedValue;
? ? ? ? ? ? ? dr["Course"]=ddlCourse1.Text;
? ? ? ? ? ? ? dr["Grade"] = ddlGrade1.SelectedValue;
? ? ? ? ? ? //??瀛??″????瀹? ? ? ? ? ? ? ? dr["TeachinMmethods"] = txtWeek.Text;
? ? ? ? ? ? ? dr["Content"] = txtContent.Text;
? ? ? ? ? ? ? dr["Week"] = txtWeek.Text;
? ? ? ? ? ? ? dr["Chapter"] = txtChapter.Text;
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ?ヨ?? ? ? ? ? protected void lnkSearch_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? string condition = " 1=1 ";
? ? ? ? ? ? string ch = "";
? ? ? ? ? ? string id = "";
? ? ? ? ? ? string id1 = "";
? ? ? ? ? ? string sql = "";
? ? ? ? ? ? string year = "";
? ? ? ? ? ? if (ddlGrade.SelectedValue != "")
? ? ? ? ? ? {
? ? ? ? ? ? ? ? condition = condition + "and Grade like '%" + ddlGrade.SelectedValue + "%' ";
? ? ? ? ? ? ? ? //id = ddlGrade.SelectedValue;
? ? ? ? ? ? ? ? //Common com = new Common();
? ? ? ? ? ? ? ? //sql = "select distinct Grade from t_teachingplan where Grade='" + id + "' order by Grade";
? ? ? ? ? ? ? ? //DataSet ds = com.GetDataSet(sql);
? ? ? ? ? ? ? ? //if (ds.Tables[0].Rows.Count > 0)
? ? ? ? ? ? ? ? //{
? ? ? ? ? ? ? ? // ? ?DataRow dr = ds.Tables[0].Rows[0];
? ? ? ? ? ? ? ? // ? ?year = dr["Year"].ToString();
? ? ? ? ? ? ? ? //}
? ? ? ? ? ? }
? ? ? ? ? ? if (ddlCourse.SelectedValue != "")
? ? ? ? ? ? {
? ? ? ? ? ? ? ? condition = condition + "and Course like '%" + ddlCourse.SelectedValue + "%' ";
? ? ? ? ? ? }
? ? ? ? ? ? if (ddlSchoolYear.SelectedValue != "")
? ? ? ? ? ? {
? ? ? ? ? ? ? ? condition = condition + "and SchoolYear like '%" + ddlSchoolYear.SelectedValue + "%' ";
? ? ? ? ? ? }
? ? ? ? ? ? if (ddlSchoolTerm.SelectedValue != "")
? ? ? ? ? ? {
? ? ? ? ? ? ? ? condition = condition + "and SchoolTerm like '%" + ddlSchoolTerm.SelectedValue + "%' ";
? ? ? ? ? ? }
? ? ? ? ? ?
? ? ? ? ? ? ViewState["Searcher"] = condition;
? ? ? ? ? ? GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ?剧ず?ㄩ?? ? ? ? ? protected void lnkShowAll_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? ViewState["Searcher"] = " 1=1 ";
? ? ? ? ? ? GridViewBind(ViewState["Searcher"].ToString());
? ? ? ? }
? ? ? ? #endregion
? ? ? ? #region ?峰???瀹??垮害??瀛?绗?覆
? ? ? ? ?public string getMyStr(string str, int a)
? ? ? ? {
? ? ? ? ? ? if (str.Length >= a)
? ? ? ? ? ? ? ? return str.Substring(0, a);
? ? ? ? ? ? else
? ? ? ? ? ? ? ? return str;
? ? ? ? }
? ? ? #endregion
? ? ? ? ?#region
? ? ? ?
? ? ? ? ?#endregion
? ? ? ? ?protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
? ? ? ? ?{
? ? ? ? ? ??
? ? ? ? ? ? ?//GridView1.PageIndex = e.NewEditIndex+1;
? ? ? ? ? ? ?GridView1.EditIndex = e.NewEditIndex;
? ? ? ? ? ? ?EditGridView();
? ? ? ? ?}
? ? }
}
?