/// <summary>
        /// 搜索的方法
        /// </summary>
        private void GetLogInfoSeach()
        {
            try
            {
                sqlwhere = "  1=1";
                string beginTime = this.txtbeginTime.Value.ToString();
                string endTime   = this.txtendTime.Value.ToString();
                string name      = this.txtLog_Name.Text.Trim();
                string type      = this.comboxType.Text.Trim();


                if (!string.IsNullOrEmpty(type))//日志操作类型
                {
                    if (type == "全部")
                    {
                        sqlwhere = "  1=1";
                    }
                    else
                    {
                        sqlwhere += String.Format(" and Dictionary_Name like '%{0}%'", type);
                    }
                }
                if (!string.IsNullOrEmpty(name))//日志操作人名称
                {
                    sqlwhere += String.Format(" and Log_Name like '%{0}%'", name);
                }
                if (beginTime != "")//开始时间
                {
                    sqlwhere += String.Format(" and Log_Time >= '{0}'", beginTime);
                }
                if (endTime != "")//结束时间
                {
                    sqlwhere += String.Format(" and Log_Time <= '{0}'", endTime);
                }
                if (beginTime != "" && endTime != "")
                {
                    if (CommonalityEntity.GetDateTime(beginTime) > CommonalityEntity.GetDateTime(endTime))
                    {
                        MessageBox.Show("查询开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtbeginTime.Text = "";
                        txtendTime.Text   = "";
                        return;
                    }
                }
            }
            catch
            {
                CommonalityEntity.WriteTextLog("LogInfoForm.GetLogInfoSeach()异常:");
            }
            finally
            {
                LogInfoLoad("");
            }
        }
        /// <summary>
        /// “搜 索” 的单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSearch_Click(object sender, EventArgs e)
        {
            #region  注释
            try
            {
                int    i   = 0;
                string str = "";
                //得到查询的条件
                string name      = this.txtLog_Name.Text.Trim();
                string beginTime = this.txtbeginTime.Text.Trim();
                string endTime   = this.txtendTime.Text.Trim();
                string begin     = beginTime + " 00:00:00";
                string end       = endTime + "23:59:59 ";

                expr = PredicateExtensionses.True <View_LogInfo_Dictionary>();

                if (name != "")//操作人
                {
                    expr = expr.And(n => SqlMethods.Like(n.Log_Name, "%" + txtLog_Name.Text.Trim() + "%"));


                    i++;
                }
                if (beginTime != "")//开始时间
                {
                    expr = expr.And(n => n.Log_Time >= CommonalityEntity.GetDateTime(begin));

                    i++;
                }
                if (endTime != "")//结束时间
                {
                    expr = expr.And(n => n.Log_Time <= CommonalityEntity.GetDateTime(end));

                    i++;
                }
                if (beginTime != "" && endTime != "")
                {
                    if (CommonalityEntity.GetDateTime(beginTime) > CommonalityEntity.GetDateTime(endTime))
                    {
                        MessageBox.Show("查询开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtbeginTime.Text = "";
                        txtendTime.Text   = "";
                        return;
                    }
                }
                if (this.comboxType.SelectedValue != null)
                {
                    int stateID = Converter.ToInt(comboxType.SelectedValue.ToString());
                    if (stateID > 0)
                    {
                        Dictionary dicEntity = comboxType.SelectedItem as Dictionary;
                        if (dicEntity.Dictionary_Value == "全部")
                        {
                            expr = n => n.Log_ID != null;
                        }
                        else
                        {
                            expr = expr.And(n => n.Log_Type == CommonalityEntity.GetInt(comboxType.SelectedValue.ToString()));
                        }
                    }


                    i++;
                }

                if (i == 0)
                {
                    expr = n => n.Log_ID != null;
                }
            }
            catch
            {
                CommonalityEntity.WriteTextLog("CommonalityEntity.btnSearch()");
            }
            finally
            {
                page = new PageControl();
                LogInfoLoad("");
                LoadData();
            }
            #endregion
            if (btnSearch.Enabled)
            {
                btnSearch.Enabled = false;
                GetLogInfoSeach();
                LogInfoDAL.AddLoginfo("查询", "检测项目查询", CommonalityEntity.USERNAME);//操作日志
                btnSearch.Enabled = true;
            }
        }