⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 operatelog.aspx

📁 OA系统源码 办公应用软件源码 asp.net 开发
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"CodeFile="OperateLog.aspx.cs" Inherits="Sysmagae_OperateLog" %>

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

<script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
<script language="javascript" type="text/javascript">	
		  //实现页面上复选控件全选和全不选功能
    function changecolor(parameter)
    {
     if(parameter.checked)
     {
     parameter.parentElement.parentElement.style.background="#ff9900";
     }
     else
     {
     parameter.parentElement.parentElement.style.background="";
     }
    }

		 function GetAllCheckBox(parentItem)
    {
     var items = document.getElementsByTagName("input"); 
     
     for(i=0; i<items.length;i++)
     {
       
       if(parentItem.checked)
       {
         if(items[i].type=="checkbox")
          {           
                items[i].checked = true;
                items[i].parentElement.parentElement.style.background="#6699ff";
                parentItem.parentElement.parentElement.style.background="#ffffff";
             
          }
       }
      else
      {
         if(items[i].type=="checkbox")
          {
           items[i].checked = false;
           items[i].parentElement.parentElement.style.background="";
          }
       }
      }
    }	
        function fillstring(str)
		{
			if(str.length==1)
			{
				str = "0" + str; 
			}
			return(str);
		}
		function quickseldate(type)
		{
			var begintime,endtime;
			var oneminute = 60*1000;
			var onehour   = 60*oneminute;
			var oneday    = 24*onehour;
			var oneweek   = 7*oneday;
			
			var todayDate = new Date();
			var date = todayDate.getDate();
			var month= todayDate.getMonth() +1;
			var year= todayDate.getYear();
			var day = todayDate.getDay();
			if(navigator.appName == "Netscape")
			{
				year = 1900 + year;
			}

			//-->
						
			if(type=="day")
			{
				begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + 

fillstring(date.toString());
				endtime = begintime;
			}
			else if(type=="week")
			{
				var daytoMon = day-1;
				if(day==0) 
					daytoMon = 6;
				
				todayDate.setTime(todayDate.getTime()-daytoMon*oneday);
				date = todayDate.getDate();
				month= todayDate.getMonth() +1;
				year= todayDate.getYear();
				day = todayDate.getDay();
				
				begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + 

fillstring(date.toString());
				
				todayDate.setTime(todayDate.getTime()+6*oneday);
				
				date = todayDate.getDate();
				month= todayDate.getMonth() +1;
				year= todayDate.getYear();
				
				endtime = year.toString() + "-" + fillstring(month.toString()) + "-" + 

fillstring(date.toString());
			}
			else if(type=="month")
			{
				var dateto1 = date-1;
				
				todayDate.setTime(todayDate.getTime()-dateto1*oneday);
				date = todayDate.getDate();
				month= todayDate.getMonth() +1;
				year= todayDate.getYear();
				day = todayDate.getDay();
				
				begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + 

fillstring(date.toString());
				
				todayDate.setMonth(month);
				todayDate.setTime(todayDate.getTime()-oneday);
				
				date = todayDate.getDate();
				month= todayDate.getMonth() +1;
				year= todayDate.getYear();
				
				endtime = year.toString() + "-" + fillstring(month.toString()) + "-" + 

fillstring(date.toString());

			}

			document.getElementById("<% =txtBeginTime.ClientID %>").value = begintime;
			document.getElementById("<% =txtEndTime.ClientID %>").value = endtime;
		
		}
		function quanxuan(cbCheckBox){
		    var item=document.getElementsByTagName("input");
		    for(i=0;i<item.length;i++){
		        if(item[i].type=="checkbox"){
		            item[i].checked=cbCheckBox.checked;
		        }
		    }
		}
</script>
    
<div>
      <div style="width:99%;height:30px; text-align:left;">
          当前位置:操作日志</div>
      <div style="text-align:center"><b>操&nbsp; 作 日 志</b></div>  
      <hr style="width:90%; text-align:center;" size="1" color="gray" />
      <div style="width:90%; height:30px">
             输入时间段:<asp:textbox id="txtBeginTime" runat="server" onFocus="new WdatePicker(this,'%Y-%M-%D',true,'default')" CssClass="inputCss" Width="109px"></asp:textbox>-------<asp:textbox id="txtEndTime" runat="server" onFocus="new WdatePicker(this,'%Y-%M-%D',true,'default')" CssClass="inputCss" Width="108px"></asp:textbox>
    <asp:CompareValidator id="cvTime" runat="server" Display="Dynamic" ControlToValidate="txtEndTime"	Operator="GreaterThanEqual" ErrorMessage="结束时间不应小于开始时间" ControlToCompare="txtBeginTime"></asp:CompareValidator>
    <asp:radiobutton id="rdoThisDay" onclick="quickseldate('day');" runat="server" Text="本日" GroupName="quickdate"></asp:radiobutton>
	<asp:radiobutton id="rdoThisWeek" onclick="quickseldate('week');" runat="server" Text="本周" GroupName="quickdate"></asp:radiobutton>
	<asp:radiobutton id="rdoThisMonth" onclick="quickseldate('month');" runat="server" Text="本月" GroupName="quickdate"></asp:radiobutton>
    </div>
     <div style="width:90%; height:30px; text-align:left; padding-top:15px">
         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
         &nbsp; &nbsp;&nbsp;
    <asp:ImageButton ID="imgbtnSearch" ImageUrl="~/images/search.gif" runat="server" Width="100px" Height="21px" OnClick="imgbtnSearch_Click"  />
    </div>
     <div style="width:90%; height:30px">
      <div style="width:40%; height:30px; text-align:left; float:left">
      <input type="checkbox" id="btnSelectAll" runat="server" onclick="quanxuan(this)"/><asp:Label ID="lblSelectAll" Text="全选" runat="server" Width="49px"></asp:Label>
      </div>
     
     <div style="width:50%; text-align:right; height:30px; float:left"> 
     <input type="submit" id="btnDelete" runat="server" class="buttonCss" value="删除选定项" style="width: 75px; height: 23px" onserverclick="btnDelete_ServerClick" />
     </div>
      </div>
    <div style="width:99%;" align="center">   
    
   <asp:GridView ID="gvOperateLog" Width="96%" runat="server" DataKeyNames="OperateId"  AutoGenerateColumns="False" BorderColor="#66CCFF" BorderWidth="1px" CellPadding="4"  AllowPaging="True" dI>
                         <Columns>      
                          <asp:TemplateField HeaderText="选定(√)">
                          <ItemTemplate>
                         <asp:CheckBox ID="chkOperateLog" runat="server" />      
                          </ItemTemplate>                                 
                          </asp:TemplateField>  
                                         
                            <asp:TemplateField HeaderText="序号">
                          <ItemTemplate>
                          <asp:Label ID="lblNo" runat="server" Text='<%# Eval("OperateId") %>'></asp:Label>                              
                          </ItemTemplate>                                 
                          </asp:TemplateField>                         
                          <asp:BoundField DataField="userid" HeaderText="操作用户" />   
                          <asp:BoundField DataField="operatename" HeaderText="事件" />
                            
                          <asp:BoundField DataField="operatedesc" HeaderText="操作描述" /> 
                          <asp:BoundField DataField="operatetime" HeaderText="操作时间" />                      
                                                     
                          </Columns>
                          
                      </asp:GridView>
    
    </div>
</div>   

</asp:Content>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -