您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->某贸易公司项目管理系统源码>>DiaryList.aspx>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:某贸易公司项目管理系统源码
当前文件:文件类型 ProjectEva/DiaryList.aspx打开代码结构图
普通视图
		            
1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DiaryList.aspx.cs" Inherits="DiaryList" %> 2 3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4 5<html xmlns="http://www.w3.org/1999/xhtml" > 6<head runat="server"> 7 <title>无标题页</title> 8 <link href="css/css.css" rel="stylesheet" type="text/css" /> 9</head> 10<body> 11 <form id="form1" runat="server"> 12 <div> 13 <br /> 14 <br /> 15 <asp:Panel ID="Panel1" runat="server" Height="324px" align="center" Width="614px"> 16 <asp:GridView ID="GridView1" runat="server" Width="578px" AllowPaging="True" AutoGenerateColumns="False" BorderColor="Silver" DataKeyNames="ID" DataSourceID="SqlDataSource1" OnRowDataBound="GridView1_RowDataBound" PageSize="9"> 17 <PagerSettings FirstPageText="第一页" LastPageText="最后一页" Mode="NextPreviousFirstLast" 18 NextPageText="下一页" PageButtonCount="9" PreviousPageText="上一页" /> 19 <Columns> 20 <asp:BoundField DataField="Diary_Title" HeaderText="日记标题" SortExpression="Diary_Title" /> 21 22 <asp:TemplateField HeaderText="日记内容" > 23 <EditItemTemplate> 24 <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Diary_Content") %>'></asp:TextBox> 25 </EditItemTemplate> 26 <ItemTemplate> 27 <a href="#" onclick="window.open('<%# "Diary_Details.aspx?ID="+Eval("ID") %>','_blank','left=210,top=120,width=400,height=200')">查看详细内容 </a> 28 </ItemTemplate> 29 </asp:TemplateField> 30 <asp:BoundField DataField="Diary_Date" DataFormatString="{0:d}" HeaderText="日期" SortExpression="Diary_Date" /> 31 <asp:TemplateField HeaderText="心情" SortExpression="Mood"> 32 <EditItemTemplate> 33 <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Mood") %>'></asp:TextBox> 34 </EditItemTemplate> 35 <ItemTemplate> 36 <asp:Image ID="Image1" runat="server" ImageUrl='<%# "Images/"+Eval("Mood")+".gif" %>' /> 37 </ItemTemplate> 38 </asp:TemplateField> 39 <asp:CommandField HeaderText="删除" ShowDeleteButton="True" ShowHeader="True" /> 40 </Columns> 41 <RowStyle HorizontalAlign="Center" VerticalAlign="Middle" /> 42 <PagerStyle BackColor="#C0FFFF" HorizontalAlign="Center" VerticalAlign="Middle" /> 43 <HeaderStyle BackColor="#C0FFFF" Font-Size="12px" HorizontalAlign="Center" VerticalAlign="Middle" /> 44 <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" /> 45 </asp:GridView> 46 &nbsp; 47 </asp:Panel> 48 &nbsp;&nbsp;<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conString %>" 49 SelectCommand="SELECT * FROM [Diary] WHERE ([Employee] = @Employee) ORDER BY [Diary_Date] DESC" DeleteCommand="DELETE FROM [Diary] WHERE [ID] = @ID" InsertCommand="INSERT INTO [Diary] ([Employee], [Diary_Title], [Diary_Content], [Diary_Date], [Mood]) VALUES (@Employee, @Diary_Title, @Diary_Content, @Diary_Date, @Mood)" UpdateCommand="UPDATE [Diary] SET [Employee] = @Employee, [Diary_Title] = @Diary_Title, [Diary_Content] = @Diary_Content, [Diary_Date] = @Diary_Date, [Mood] = @Mood WHERE [ID] = @ID"> 50 <SelectParameters> 51 <asp:SessionParameter Name="Employee" SessionField="Name" Type="String" /> 52 </SelectParameters> 53 <DeleteParameters> 54 <asp:Parameter Name="ID" Type="Int32" /> 55 </DeleteParameters> 56 <UpdateParameters> 57 <asp:Parameter Name="Employee" Type="String" /> 58 <asp:Parameter Name="Diary_Title" Type="String" /> 59 <asp:Parameter Name="Diary_Content" Type="String" /> 60 <asp:Parameter Name="Diary_Date" Type="DateTime" /> 61 <asp:Parameter Name="Mood" Type="String" /> 62 <asp:Parameter Name="ID" Type="Int32" /> 63 </UpdateParameters> 64 <InsertParameters> 65 <asp:Parameter Name="Employee" Type="String" /> 66 <asp:Parameter Name="Diary_Title" Type="String" /> 67 <asp:Parameter Name="Diary_Content" Type="String" /> 68 <asp:Parameter Name="Diary_Date" Type="DateTime" /> 69 <asp:Parameter Name="Mood" Type="String" /> 70 </InsertParameters> 71 </asp:SqlDataSource> 72 </div> 73 </form> 74</body> 75</html> 76
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:某贸易公司项目管理系统源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号