コード例 #1
0
 /// <summary>
 /// Search aggregates role
 /// </summary>
 private void Search()
 {
     this.panelLabelNoResult.Visible = false;
     if (string.IsNullOrEmpty(this.txt_codice.Text) && string.IsNullOrEmpty(this.txt_descrizione.Text))
     {
         string s = "<script language='javascript'>alert('Attenzione! Per poter effettuare la ricerca è necessario compilare i campi codice e/o descrizione');</script>";
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "WarningSearch", s, false);
     }
     else
     {
         string typeAur     = ddlAur.SelectedItem.Value;
         string code        = txt_codice.Text;
         string description = txt_descrizione.Text;
         ListResultAur = ws.SearchAur(typeAur, code, description, ID_ADMINISTRATION).ToList();
         if (ListResultAur != null && ListResultAur.Count > 0)
         {
             this.upPnlResult.Visible      = true;
             GrdAssertionResult.DataSource = BuildObjectAggregatorRole(ListResultAur);
             GrdAssertionResult.DataBind();
             this.GrdAssertionResult.SelectedIndex = Convert.ToInt32(this.grdAssertionResult_rowindex.Value);
             HighlightSelectedRow(GrdAssertionResult);
             upPnlResult.Update();
         }
         else
         {
             GrdAssertionResult.DataSource = null;
             GrdAssertionResult.DataBind();
             this.panelLabelNoResult.Visible = true;
         }
     }
     this.upPnlResult.Update();
 }