protected void Page_Load(object sender, EventArgs e)
{
DawTextBox11.Attributes.Add("onkeyup", "ontxtboxkeyup();");//用AjaxManager操作表格延时1秒 线程休眠
string Script = @"
var lastTextboxLen = {4};
var lastKeyupTime = new Date(1900,1,1);
function ontextchanged()
{0}
window['{2}'].AjaxRequest('TextChanged');
{1}
function ontxtboxkeyup()
{0}
var txtbox = document.getElementById('{3}');
if(lastTextboxLen != txtbox.value.length && (new Date()-lastKeyupTime)>2000)
{0}
setTimeout('ontextchanged()', 2000);
lastKeyupTime = new Date();
{1}
lastTextboxLen = txtbox.value.length;
{1}
function gridRowDblClick(index)
{0}
window.location = 'PatientRegisterTaber.aspx?MedicalCardId='+escape(this.Rows[index].KeyValues['MedicalCardId'])+'&PatientId='+escape(this.Rows[index].KeyValues['PatientId']);
{1}
";
new JsHelper(Page).RegisterClientScriptBlock(string.Format(Script, "{", "}", DawAjaxManager1.ClientID, DawTextBox11.ClientID, DawTextBox11.Text.Length));
}
{
DawTextBox11.Attributes.Add("onkeyup", "ontxtboxkeyup();");//用AjaxManager操作表格延时1秒 线程休眠
string Script = @"
var lastTextboxLen = {4};
var lastKeyupTime = new Date(1900,1,1);
function ontextchanged()
{0}
window['{2}'].AjaxRequest('TextChanged');
{1}
function ontxtboxkeyup()
{0}
var txtbox = document.getElementById('{3}');
if(lastTextboxLen != txtbox.value.length && (new Date()-lastKeyupTime)>2000)
{0}
setTimeout('ontextchanged()', 2000);
lastKeyupTime = new Date();
{1}
lastTextboxLen = txtbox.value.length;
{1}
function gridRowDblClick(index)
{0}
window.location = 'PatientRegisterTaber.aspx?MedicalCardId='+escape(this.Rows[index].KeyValues['MedicalCardId'])+'&PatientId='+escape(this.Rows[index].KeyValues['PatientId']);
{1}
";
new JsHelper(Page).RegisterClientScriptBlock(string.Format(Script, "{", "}", DawAjaxManager1.ClientID, DawTextBox11.ClientID, DawTextBox11.Text.Length));
}