/// <summary> /// 查询功能 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void TbutQueryClick(object sender, DirectEventArgs e) { try { string where = " 1=1 "; if (TxtPicName.Text != "") { where += where = " and picName like '%" + TxtPicName.Text.ToString() + "%' "; } if (CmbLrr.SelectedItem.Value != null) { where += where = " and lrr like '%" + CmbLrr.SelectedItem.Value + "%' "; } DataTable dt = noticeManager.GetNoticePicInfo(where); if (dt.Rows.Count > 0 && dt != null) { StorePicManager.DataSource = dtgg = Bll.Common.ChangColName(dt); StorePicManager.DataBind(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("NoticePicManager.aspx-TbutQueryClick", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception"); } }