namespace Sbc.UI.Web.UserControls
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Sbc.UI.Web.Utilities;
/// <summary>
/// Summary description for search_form.
/// </summary>
public class search_form : BaseControl
{
protected System.Web.UI.WebControls.ImageButton btnSearch;
protected System.Web.UI.HtmlControls.HtmlInputText txtEmployee;
protected System.Web.UI.WebControls.Table TABLE1;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.HtmlControls.HtmlInputHidden EnterHit;
private void Page_Load(object sender, System.EventArgs e)
{
System.Text.StringBuilder jScriptStr = new System.Text.StringBuilder();
jScriptStr.Append("<script language=javascript>");
jScriptStr.Append("function FindKey(){");
jScriptStr.Append("if (event.keyCode == 13) {");
jScriptStr.Append("document.frmMain.EnterHit.value='Y';document.frmMain.submit();}}");
jScriptStr.Append("</script>");
Page.RegisterStartupScript("cs", jScriptStr.ToString());
txtEmployee.Attributes.Add("onKeyPress","FindKey();");
if (EnterHit.Value == "Y")
{
Session[ConstantValues.SessionVarNewSearch] = "T";
Server.Transfer("selectEmployee.aspx?txtEmployee=" + txtEmployee.Value + "&NewSearch=T");
}
}
public void Perform_Search(object sender, System.Web.UI.ImageClickEventArgs e)
{
Session[ConstantValues.SessionVarNewSearch] = "T";
Server.Transfer("selectEmployee.aspx?txtEmployee=" + txtEmployee.Value + "&NewSearch=T");
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}