CalendarView.aspx
上传用户:cha0314
上传日期:2014-03-02
资源大小:12522k
文件大小:10k
源码类别:

C#编程

开发平台:

C#

  1. <%@ Page language="c#" Codebehind="CalendarView.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.Schedule.CalendarView" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4. <HEAD>
  5. <title>CalendarList</title>
  6. <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  7. <meta content="C#" name="CODE_LANGUAGE">
  8. <meta content="JavaScript" name="vs_defaultClientScript">
  9. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  10. <script language="javascript">
  11. function dialwinprocess(CurrDate,CurrTime,whichPg,TaskID)
  12. {
  13.    if(whichPg==1)
  14. var newdialoguewin = window.showModalDialog("Manage.aspx?CurrDate="+CurrDate+"&CurrTime="+CurrTime,window,"dialogWidth:1000px;DialogHeight=700px;status:no");
  15.    else
  16.    var newdialoguewin = window.showModalDialog("TaskDetail.aspx?TaskID="+TaskID,window,"dialogWidth:1000px;DialogHeight=700px;status:no");
  17. }
  18. var ball1 = new Image();
  19. var ball2 = new Image();
  20. ball1.src = 'images/ball1.gif';
  21. ball2.src = 'images/ball2.gif';
  22. var active = new Image();
  23. var nonactive = new Image();
  24. active.src = '../../../images/maillistbutton2.gif';
  25. nonactive.src = '../../../images/maillistbutton1.gif';
  26. function onMouseOver(img)
  27. {
  28. document.images[img].src = ball2.src;
  29. }
  30. function onMouseOut(img)
  31. {
  32. document.images[img].src = ball1.src;
  33. }
  34. function onOverBar(bar)
  35. {
  36. if (bar != null) {
  37. bar.style.backgroundImage = "url("+active.src+")";
  38. }
  39. }
  40. function onOutBar(bar)
  41. {
  42. if (bar != null) {
  43. bar.style.backgroundImage = "url("+nonactive.src+")";
  44. }
  45. }
  46. function selectAll(){
  47. var len=document.MailList.elements.length;
  48. var i;
  49.     for (i=0;i<len;i++){
  50. if (document.MailList.elements[i].type=="checkbox"){
  51.         document.MailList.elements[i].checked=true;
  52.  }
  53. }
  54. }
  55. function unSelectAll(){
  56.           var len=document.MailList.elements.length;
  57.           var i;
  58.           for (i=0;i<len;i++){
  59.                if (document.MailList.elements[i].type=="checkbox"){
  60.                   document.MailList.elements[i].checked=false; 
  61.                }   
  62.           } 
  63.     }
  64. </script>
  65. <style>A.linkFooter:link { FONT-WEIGHT: normal; FONT-SIZE: 9px; COLOR: #646464; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none }
  66. A.linkFooter:visited { FONT-WEIGHT: normal; FONT-SIZE: 9px; COLOR: #646464; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none }
  67. A.linkFooter:hover { FONT-WEIGHT: normal; FONT-SIZE: 9px; COLOR: #646464; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: underline }
  68. A.linkFooter:active { FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #646464; LINE-HEIGHT: 25px; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
  69. A.linkMenu:link { FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #838383; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none }
  70. A.linkMenu:visited { FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #838383; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none }
  71. A.linkMenu:active { FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #838383; LINE-HEIGHT: 10px; FONT-FAMILY: "宋体"; TEXT-DECORATION: underline }
  72. A.linkMenu:hover { FONT-WEIGHT: normal; FONT-SIZE: 9px; COLOR: #ffffff; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none }
  73. BODY { SCROLLBAR-FACE-COLOR: #ffffff; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #ffffff; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #949494; SCROLLBAR-TRACK-COLOR: #ffffff; SCROLLBAR-DARKSHADOW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #ffffff }
  74. .borderMenuLayer { BORDER-LEFT-COLOR: #c9c9c9; BORDER-BOTTOM-COLOR: #c9c9c9; BORDER-TOP-COLOR: #c9c9c9; BORDER-RIGHT-COLOR: #c9c9c9 }
  75. .borderMenuLayerOver { FONT-SIZE: 9pt; BORDER-LEFT-COLOR: #949494; BORDER-BOTTOM-COLOR: #949494; BORDER-TOP-COLOR: #949494; BORDER-RIGHT-COLOR: #949494 }
  76. .textWhite { FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #999999; LINE-HEIGHT: 22px; FONT-FAMILY: "宋体" }
  77. .top { FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: "Arial", "Helvetica", "sans-serif"; TEXT-DECORATION: none }
  78. </style>
  79. </HEAD>
  80. <body MS_POSITIONING="GridLayout">
  81. <form id="CalendarList" method="post" runat="server">
  82. <asp:dropdownlist id="listStaff" style="Z-INDEX: 102; LEFT: 487px; POSITION: absolute; TOP: 293px" runat="server" AutoPostBack="True" Visible="False"></asp:dropdownlist>
  83. <table cellSpacing="0" cellPadding="0" width="100%" border="0">
  84. <tr>
  85. <td>
  86. <TABLE id="tblContainer" height="25" cellSpacing="0" cellPadding="0" width="100%" border="0" runat="server">
  87. <tr>
  88. <td id="bar1" align="middle" width="90" background="../../images/maillistbutton1.gif">&nbsp;<FONT face="宋体"><asp:linkbutton id="lnkbtnToday" runat="server" ForeColor="Black" BackColor="Transparent" Font-Size="X-Small">今日未完成</asp:linkbutton></FONT>
  89. </td>
  90. <td id="bar2" align="middle" width="90" background="../../images/maillistbutton1.gif">&nbsp;<asp:linkbutton id="lnkbtnHistory" runat="server" ForeColor="Black" BackColor="Transparent" Font-Size="X-Small">历史未完成</asp:linkbutton></td>
  91. <td id="bar3" align="middle" width="90" background="../../images/maillistbutton1.gif"><asp:linkbutton id="lnkbtnFinished" runat="server" ForeColor="Black" BackColor="Transparent" Font-Size="X-Small">已完成</asp:linkbutton>&nbsp;</td>
  92. <td><FONT face="宋体"><asp:linkbutton id="lnkbtnReturn" runat="server" Visible="False" Font-Size="X-Small">返回</asp:linkbutton>&nbsp;&nbsp;&nbsp;&nbsp;
  93. <asp:LinkButton id="lnkbtnNew" runat="server" Font-Size="X-Small">新建</asp:LinkButton>&nbsp;&nbsp;
  94. <asp:linkbutton id="lnkbtnAccept" runat="server" Visible="False" Font-Size="X-Small">接受</asp:linkbutton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:linkbutton id="lnkbtnCancel" runat="server" Visible="False" Font-Size="X-Small">取消</asp:linkbutton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:linkbutton id="lnkbtnFinish" runat="server" Visible="False" Font-Size="X-Small">完成</asp:linkbutton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:linkbutton id="lnkbtnAdd" runat="server" Visible="False" Font-Size="X-Small">任务安排</asp:linkbutton>&nbsp;</FONT></td>
  95. </tr>
  96. </TABLE>
  97. </td>
  98. </tr>
  99. <TR>
  100. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT><FONT face="宋体">&nbsp;</FONT>&nbsp;<FONT face="宋体">&nbsp;&nbsp;&nbsp;</FONT><FONT face="宋体">&nbsp;&nbsp;&nbsp;</FONT><FONT face="宋体">&nbsp;&nbsp;</FONT><asp:table id="Table1" runat="server" Width="711px" Height="195px" BorderWidth="0px"></asp:table><asp:datagrid id="dgList" runat="server" BackColor="White" Width="100%" BorderWidth="1px" BorderColor="#93BEE2" CssClass="top" DataKeyField="ID" OnPageIndexChanged="DataGrid_PageChanged" PagerStyle-HorizontalAlign="Right" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="3" AllowPaging="True" PageSize="15">
  101. <AlternatingItemStyle BackColor="#E8F4FF"></AlternatingItemStyle>
  102. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  103. <HeaderStyle ForeColor="White" BackColor="#337FB2"></HeaderStyle>
  104. <FooterStyle HorizontalAlign="Center"></FooterStyle>
  105. <Columns>
  106. <asp:TemplateColumn HeaderText="选择">
  107. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  108. <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Height="20px" Width="60px"></ItemStyle>
  109. <ItemTemplate>
  110. <asp:CheckBox id="grpID" Checked="False" Runat="server"></asp:CheckBox>
  111. </ItemTemplate>
  112. </asp:TemplateColumn>
  113. <asp:TemplateColumn HeaderText="日期">
  114. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  115. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  116. <ItemTemplate>
  117. <asp:Label runat="server" Text='<%# Convert.ToDateTime(DataBinder.Eval(Container, "DataItem.Date").ToString()).ToShortDateString() %>'>
  118. </asp:Label>
  119. </ItemTemplate>
  120. </asp:TemplateColumn>
  121. <asp:TemplateColumn HeaderText="时段">
  122. <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
  123. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  124. <ItemTemplate>
  125. <asp:Label runat="server" Text='<%# GetPeriodByPeriodID(DataBinder.Eval(Container, "DataItem.beginPeriodID").ToString(),(DataBinder.Eval(Container, "DataItem.endPeriodID").ToString())) %>'>
  126. </asp:Label>
  127. </ItemTemplate>
  128. </asp:TemplateColumn>
  129. <asp:TemplateColumn HeaderText="内容">
  130. <HeaderStyle HorizontalAlign="Center" Width="140px"></HeaderStyle>
  131. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  132. <ItemTemplate>
  133. <a href="#" onclick='javascript:return dialwinprocess("","","2","<%# DataBinder.Eval(Container, "DataItem.TaskID") %>")'>
  134. <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Subject") %>'></a>
  135. </asp:Label>
  136. </ItemTemplate>
  137. </asp:TemplateColumn>
  138. <asp:TemplateColumn HeaderText="状态">
  139. <HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
  140. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  141. <ItemTemplate>
  142. <asp:Label runat="server" Text='<%# GetStatus(DataBinder.Eval(Container, "DataItem.IsConfirm").ToString()) %>'>
  143. </asp:Label>
  144. </ItemTemplate>
  145. </asp:TemplateColumn>
  146. <asp:BoundColumn DataField="CooperatorList" HeaderText="协同人员">
  147. <HeaderStyle HorizontalAlign="Center" Width="250px"></HeaderStyle>
  148. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  149. </asp:BoundColumn>
  150. </Columns>
  151. <PagerStyle HorizontalAlign="Right" BackColor="#E8F4FF" Mode="NumericPages"></PagerStyle>
  152. </asp:datagrid></td>
  153. </TR>
  154. <TR>
  155. <TD style="WIDTH: 150px">&nbsp;&nbsp;</TD>
  156. </TR>
  157. </table>
  158. </form>
  159. <SCRIPT language="javascript">
  160. <!--
  161. // 高亮背景
  162. function high( which )
  163. which.style.background = "#87F977";
  164. which.style.font.color = "#000000";
  165. }
  166. // 取消背景高亮
  167. function low( which )
  168. which.style.background = "#FFF8F7";
  169. which.style.font.color = "#000000";
  170. }
  171. -->
  172.    
  173. </SCRIPT>
  174. </body>
  175. </HTML>