示例#1
0
 private void SetJs()
 {
     try
     {
         if (AllowInsert)
         {
             Modules_Base_Form_Form ct = plcInput.Controls[0] as Modules_Base_Form_Form;
             cbAjaxSearch.Listeners.TriggerClick.Handler = "if (index == 0) { this.clearValue(); this.triggers[0].hide(); } else{" + ct.GetWindowClientID() + ".show();}";
         }
         else
         {
             cbAjaxSearch.Listeners.TriggerClick.Handler = "if (index == 0) { this.clearValue(); this.triggers[0].hide(); }";
         }
     }
     catch (Exception ex)
     {
         Dialog.ShowError("AjaxSearch.ascx/SetJs() = " + ex.Message);
     }
 }
示例#2
0
 /// <summary>
 /// Thiết lập Listener for combobox
 /// </summary>
 private void SetJs()
 {
     try
     {
         cbBox.Listeners.Expand.Handler = "if(" + hdfInsertStatus.ClientID + ".getValue()=='refresh'){" + hdfInsertStatus.ClientID + ".setValue('');" + Store1.ClientID + ".reload(); }";
         if (AllowInsert)
         {
             Modules_Base_Form_Form ct = plcInput.Controls[0] as Modules_Base_Form_Form;
             cbBox.Listeners.TriggerClick.Handler = "if (index == 0) { this.clearValue(); this.triggers[0].hide(); } else{" + ct.GetWindowClientID() + ".show();" + hdfInsertStatus.ClientID + ".setValue('refresh');}";
         }
         else
         {
             cbBox.Listeners.TriggerClick.Handler = "if (index == 0) { this.clearValue(); this.triggers[0].hide(); } else{" + hdfInsertStatus.ClientID + ".setValue('refresh');}";
         }
     }
     catch (Exception ex)
     {
         Dialog.ShowError("ComboBox.ascx/SetJs() = " + ex.Message);
     }
 }