复制代码 代码如下:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchForm.ascx.cs" Inherits="System_Assets_Report_SearchForm" %>
<div>
资产编号 <asp:TextBox runat="server" CssClass="textbox" ></asp:TextBox>
<asp:Button runat="server" Text="Search" />
<asp:Button runat="server" Text="导出至Excel" Enabled="false" />
</div>
复制代码 代码如下:
public delegate void SearchEventHandler(object sender, EventArgs e);
public delegate void ExportEventHandler(object sender, EventArgs e);
复制代码 代码如下:
public void EnabledExportButton(bool enabled)
{
this.ButtonExport.Enabled = enabled;
}
复制代码 代码如下:
public string GetAssetsNumber()
{
return this.TextBoxAssetsNumber.Text.Trim();
}
复制代码 代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Insus.NET;
public partial class System_Assets_Report_SearchForm : BaseUserControl
{
public delegate void SearchEventHandler(object sender, EventArgs e);
public delegate void ExportEventHandler(object sender, EventArgs e);
public event SearchEventHandler SearchClick;
public event ExportEventHandler ExportClick;
public string GetAssetsNumber()
{
return this.TextBoxAssetsNumber.Text.Trim();
}
public void EnabledExportButton(bool enabled)
{
this.ButtonExport.Enabled = enabled;
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ButtonSearch_Click(object sender, EventArgs e)
{
if (SearchClick != null)
SearchClick(this, e);
}
protected void ButtonExport_Click(object sender, EventArgs e)
{
if (ExportClick != null)
ExportClick(this, e);
}
}
新闻热点
疑难解答
图片精选