|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我以前很喜欢Serv-U,自从它用Java重写之后我就再也没用过,实在是太慢了,我宁可用IIS搭建FTP,虽然IIS搭建FTP在权限管理上很不灵活。datagrid|数据在一个页面中要完成数据全体的显现和搜刮.
usingSystem;
usingSystem.Collections;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Web;
usingSystem.Web.SessionState;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.HtmlControls;
usingSystem.Data.SqlClient;
usingMicrosoft.ApplicationBlocks.Data;
namespaceNetBarView.AdminManage
{
///<summary>
///showlog的择要申明。
///</summary>
publicclassshowlog:System.Web.UI.Page
{
privatestringconStr=System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
protectedSystem.Web.UI.WebControls.TextBoxtbSearch;
protectedSystem.Web.UI.WebControls.ButtonbtnSearch;
protectedSystem.Web.UI.WebControls.DataGriddg;
privatevoidPage_Load(objectsender,System.EventArgse)
{
//在此处安排用户代码以初始化页面
if(!this.IsPostBack)
{
BindToDG();
}
}
privatevoidBindToDG()
{
dg.DataSource=SqlHelper.ExecuteDataset(conStr,CommandType.StoredProcedure,"mediaLogList");
dg.DataKeyField="id";
dg.DataBind();
}
#regionWeb窗体计划器天生的代码
overrideprotectedvoidOnInit(EventArgse)
{
//
//CODEGEN:该挪用是ASP.NETWeb窗体计划器所必须的。
//
InitializeComponent();
base.OnInit(e);
}
///<summary>
///计划器撑持所需的办法-不要利用代码编纂器修正
///此办法的内容。
///</summary>
privatevoidInitializeComponent()
{
this.btnSearch.Click+=newSystem.EventHandler(this.btnSearch_Click);
this.dg.PageIndexChanged+=newSystem.Web.UI.WebControls.DataGridPageChangedEventHandler(this.dg_PageIndexChanged);
this.Load+=newSystem.EventHandler(this.Page_Load);
}
#endregion
privatevoiddg_PageIndexChanged(objectsource,System.Web.UI.WebControls.DataGridPageChangedEventArgse)
{
dg.CurrentPageIndex=e.NewPageIndex;
if(this.tbSearch.Text=="")
{
BindToDG();
}
else
{
SearchBind();
}
}
privatevoidSearchBind()
{
//stringsql="selectid,(selectbarnamefrombaruserwhereid=barid)asbarname,medianame,addtimefrommedialogwherebarname=@barnameorderbyiddesc";
SqlParameterpm=newSqlParameter("@barname",SqlDbType.VarChar,50);
pm.Value=this.tbSearch.Text;
dg.DataSource=SqlHelper.ExecuteDataset(conStr,CommandType.StoredProcedure,"mediaLogSearch",pm);
dg.CurrentPageIndex=0;
dg.DataKeyField="id";
dg.DataBind();
}
privatevoidbtnSearch_Click(objectsender,System.EventArgse)
{
//SearchBind();
}
}
}
<%@Pagelanguage="c#"Codebehind="showlog.aspx.cs"AutoEventWireup="false"Inherits="NetBarView.AdminManage.showlog"%>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
<HTML>
<HEAD>
<title>showlog</title>
<metaname="GENERATOR"Content="MicrosoftVisualStudio.NET7.1">
<metaname="CODE_LANGUAGE"Content="C#">
<metaname="vs_defaultClientScript"content="JavaScript">
<metaname="vs_targetSchema"content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<bodyMS_POSITIONING="GridLayout"bgcolor="#799ae1"style="margin-left:0px">
<formid="Form1"method="post"runat="server">
<TABLEid="Table1"style="FONT-SIZE:9pt;WIDTH:600px"borderColor="#ccccff"cellSpacing="1"
cellPadding="0"width="907"border="1">
<TR>
<TDstyle="HEIGHT:25px"align="center"bgColor="#6699ff"colSpan="3">网吧影戏寓目日记</TD>
</TR>
<TR>
<TDstyle="HEIGHT:25px"align="center"colSpan="3"><FONTface="宋体">网吧搜刮
<asp:TextBoxid="tbSearch"runat="server"></asp:TextBox>
<asp:Buttonid="btnSearch"runat="server"Text="搜刮"></asp:Button></FONT></TD>
</TR>
<TR>
<TDstyle="WIDTH:575px"vAlign="top"align="left"width="575"colSpan="2">
<asp:DataGridid="dg"runat="server"Width="384px"AutoGenerateColumns="False"AllowPaging="True"
PageSize="30"Font-Size="X-Small"BorderColor="#3366CC"BorderStyle="None"BorderWidth="1px"
BackColor="White"CellPadding="4">
<FooterStyleForeColor="#003399"BackColor="#99CCCC"></FooterStyle>
<SelectedItemStyleFont-Bold="True"ForeColor="#CCFF99"BackColor="#009999"></SelectedItemStyle>
<ItemStyleForeColor="#003399"BackColor="White"></ItemStyle>
<HeaderStyleFont-Bold="True"ForeColor="#CCCCFF"BackColor="#003399"></HeaderStyle>
<Columns>
<asp:BoundColumnDataField="id"HeaderText="编号">
<HeaderStyleWidth="40px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumnDataField="barname"HeaderText="网吧称号">
<HeaderStyleWidth="120px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumnDataField="medianame"HeaderText="寓目影戏">
<HeaderStyleWidth="120px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumnDataField="addtime"HeaderText="寓目工夫"DataFormatString="{0:d}">
<HeaderStyleWidth="60px"></HeaderStyle>
</asp:BoundColumn>
</Columns>
<PagerStyleHorizontalAlign="Left"ForeColor="#003399"BackColor="#99CCCC"Mode="NumericPages"></PagerStyle>
</asp:DataGrid>
</TD>
<TDwidth="2"></TD>
</TR>
<TR>
<TDstyle="WIDTH:1px"></TD>
<TDalign="center"style="WIDTH:291px">
</TD>
<TDwidth="2"><FONTface="宋体"></FONT></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
一个很大的类库。应用程序之所以难以跨平台,在于直接调用了特定平台的接口,而一个巨大的类库,就能极大地减少应用程序对平台的依赖。 |
|