private string strWhere()
 {
     RealTimeBLL rtbll = new RealTimeBLL();
     //if ()
     string[,] strArray = null;
     string str = string.Empty;
     if (chkLead.Checked)
     {
         str = string.Format("(select EnumID from EnumTable"
                 + " where FunID = 4 and EnumValue = '1')");
     }
     if (!chkLead.Checked)
     {
         strArray = new string[5, 4]{{"cs.CodeSenderAddress","=",txtCodeSender.Text,"int"},
                     {"ei.EmpName","=",txtEmpName.Text,"string"},
                     {"ew.WorkTypeID","=",cmbWorkType.SelectedValue.ToString()=="0"?"":cmbWorkType.SelectedValue.ToString(),"int"},
                     {"enc.DeptID","=",cmbDept.SelectedValue.ToString()=="0"?"":cmbDept.SelectedValue.ToString(),"int"},
                     {"di.DutyClassID","in",str,"int"}
         };
     }
     else
     {
         
         strArray = new string[5, 4]{{"cs.CodeSenderAddress","=",txtCodeSender.Text,"int"},
                     {"ei.EmpName","=",txtEmpName.Text,"string"},
                     {"ew.WorkTypeID","=",cmbWorkType.SelectedValue.ToString()=="0"?"":cmbWorkType.SelectedValue.ToString(),"int"},
                     {"enc.DeptID","=",cmbDept.SelectedValue.ToString()=="0"?"":cmbDept.SelectedValue.ToString(),"int"},
                     {"di.DutyClassID","in",str,"int"}
         };
     }
     return rtbll.SelectWhere(strArray, 0);
 }
        // 查询 根据标识 描述查询
        private void bcpSelect_Click(object sender, EventArgs e)
        {
            string[,] strArray = new string[2, 4]{{"DetectionInfo","like",txtD.Text==""?"":(txtD.Text+"%"),"string"},
                                    {"Directional","like",txtWhere.Text==""?"":(txtWhere.Text+"%"),"string"}
              };
            RealTimeBLL rtbll = new RealTimeBLL();
            string where = rtbll.SelectWhere(strArray, 1);
            getInfo(1, where);

        }
        private string strWhere()
        {
            RealTimeBLL rtbll = new RealTimeBLL();

            string[,] strArray = null;
            string str = string.Empty;
            if (chkLead.Checked)
            {
                str = string.Format("(select EnumID from EnumTable"
                        + " where FunID = 4 and EnumValue = '1')");
            }
            if (!chkLead.Checked)
            {
                if (DeptTree.SelectedNode != null && DeptTree.SelectedNode.Name != "0")
                {
                    //strArray = new string[4, 4]{{"cs.CodeSenderAddress","=",txtCodeSender.Text,"int"},
                    //        {"ei.EmpName","=",txtEmpName.Text,"string"},
                    //        {"ei.DeptID","=",DeptTree.SelectedNode.Name,"int"},
                    //        {"di.DutyClassID","in",str,"int"}
                    //};

                    strArray = new string[3, 4]{{"codeSender","=",txtCodeSender.Text,"int"},
                            {"empName","=",txtEmpName.Text,"string"},
                            {"deptID","=",DeptTree.SelectedNode.Name,"int"}
                };
                }
                else
                {
                    //strArray = new string[3, 4]{{"cs.CodeSenderAddress","=",txtCodeSender.Text,"int"},
                    //        {"ei.EmpName","=",txtEmpName.Text,"string"},
                            
                    //        {"di.DutyClassID","in",str,"int"}
                    //};

                    strArray = new string[2, 4]{{"codeSender","=",txtCodeSender.Text,"int"},
                            {"empName","=",txtEmpName.Text,"string"}   
                };
                }
            }
            else
            {
                if (DeptTree.SelectedNode != null && DeptTree.SelectedNode.Name != "0")
                {
                    strArray = new string[4, 4]{{"cs.CodeSenderAddress","=",txtCodeSender.Text,"int"},
                            {"ei.EmpName","=",txtEmpName.Text,"string"},
                            
                            {"ei.DeptID","=",DeptTree.SelectedNode.Name,"int"},
                            {"di.DutyClassID","in",str,"int"}
                };
                }
                else
                {
                    strArray = new string[3, 4]{{"cs.CodeSenderAddress","=",txtCodeSender.Text,"int"},
                            {"ei.EmpName","=",txtEmpName.Text,"string"},
                            
                           
                            {"di.DutyClassID","in",str,"int"}
                };
                }
            }
            return rtbll.SelectWhere(strArray, 0);
        }