Exemplo n.º 1
0
        // 获取发码器查询条件

        private string GetStrWhere()
        {
            string[,] arr = new string[1, 4] {
                { "发码器地址", "=", txtCodeAddrss.Text, "string" }
            };
            return(rtbll.SelectWhere(arr, 1));
        }
        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));
        }
Exemplo n.º 3
0
        public string GetWhere()
        {
            string[,] strArray = null;
            strArray           = new string[2, 4] {
                { "InStationHeadTime", ">=", dtStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "string" },
                { "InStationHeadTime", "<=", dtEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "string" }
            };

            return(rtbll.SelectWhere(strArray, 1));
        }
        // 查询 根据标识 描述查询
        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);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 组织查询条件
        /// </summary>
        /// <returns></returns>
        private string strWhere()
        {
            string[,] strArray = null;

            strArray = new string[2, 4] {
                { "His_OverEmployeeBeginTime", ">", dtStartTime.Text, "string" },
                { "His_OverEmployeeBeginTime", "<", dtEndTime.Text, "string" }
            };

            return(rtbll.SelectWhere(strArray, 1));
        }
        private string strWhere()
        {
            string[,] strArray = null;
            // 人员查询
            if (rbtnEmp.Checked)
            {
                //是否是多有部门显示

                if (deptID == "")
                {
                    strArray = new string[8, 4] {
                        { "EmpName", "=", txtName.Text, "string" },
                        { "CodeSenderAddress", "=", txtCardAddress.Text, "int" },
                        { "DutyID", "=", cmbDutyName.SelectedValue.ToString() == "0"?"":cmbDutyName.SelectedValue.ToString(), "int" },
                        { "DutyClassID", "=", cmbDutyClass.SelectedValue.ToString() == "0"?"":cmbDutyClass.SelectedValue.ToString(), "int" },
                        { "WorkTypeID", "=", cmbWorkType.SelectedValue.ToString() == "0"?"":cmbWorkType.SelectedValue.ToString(), "int" },
                        { "CerTypeID", "=", cmbCerType.SelectedValue.ToString() == "0"?"":cmbCerType.SelectedValue.ToString(), "int" },
                        { "IDCard", "=", txtEmpCard.Text, "string" },
                        //{"EmpName","!=","''","int"},
                        { "CsTypeID", "=", "0", "int" }
                    };
                }
                else
                {
                    strArray = new string[9, 4] {
                        { "EmpName", "=", txtName.Text, "string" },
                        { "CodeSenderAddress", "=", txtCardAddress.Text, "int" },
                        { "DutyID", "=", cmbDutyName.SelectedValue.ToString() == "0"?"":cmbDutyName.SelectedValue.ToString(), "int" },
                        { "DutyClassID", "=", cmbDutyClass.SelectedValue.ToString() == "0"?"":cmbDutyClass.SelectedValue.ToString(), "int" },
                        { "WorkTypeID", "=", cmbWorkType.SelectedValue.ToString() == "0"?"":cmbWorkType.SelectedValue.ToString(), "int" },
                        { "CerTypeID", "=", cmbCerType.SelectedValue.ToString() == "0"?"":cmbCerType.SelectedValue.ToString(), "int" },
                        { "IDCard", "=", txtEmpCard.Text, "string" },
                        //{"EmpName","!=","''","int"},
                        { "DeptID", "=", deptID, "int" },
                        { "CsTypeID", "=", "0", "int" }
                    };
                }
            }
            else if (rbtnDept.Checked)
            {
                strArray = new string[9, 4] {
                    { "EquNO", "=", txtNO.Text, "string" },
                    { "CodeSenderAddress", "=", txtEquAddress.Text, "int" },
                    { "EquName", "=", txtEquName.Text, "string" },
                    { "ProductionDate", ">=", chkIsDate.Checked?Convert.ToDateTime(txtDateBegin.Value).ToString("yyyy-MM-dd"):"", "datetime" },
                    { "ProductionDate", "<=", chkIsDate.Checked?Convert.ToDateTime(txtDateEnd.Value).AddDays(1).ToString("yyyy-MM-dd"):"", "datetime" },
                    { "EquType", "=", cmbEquType.SelectedValue.ToString() == "0"?"":cmbEquType.SelectedValue.ToString(), "int" },
                    { "FactoryID", "=", cmb.SelectedValue.ToString() == "0"?"":cmb.SelectedValue.ToString(), "string" },
                    { "DeptID", "=", deptID, "int" },
                    { "CsTypeID", "=", "1", "int" }
                };
            }
            return(rtbll.SelectWhere(strArray, 0));
        }
Exemplo n.º 7
0
        public string GetWhere()
        {
            string[,] strArray = null;
            strArray           = new string[4, 4] {
                { "EmpName", "=", TxtEmployeeNameStation.Text, "string" },
                { "CodeSenderAddress", "=", txtBlockIDStation.Text, "string" },
                { "AreaTypeName", "=", cmbAreaType.Text == "所有"?"":cmbAreaType.Text, "string" },
                { "AreaName", "=", cmbAreaName.Text == "所有"?"":cmbAreaName.Text, "string" }
            };

            return(rtbll.SelectWhere(strArray, 1));
        }
Exemplo n.º 8
0
        public string GetWhere()
        {
            string[,] strArray = null;
            strArray           = new string[6, 4] {
                { "EmpName", "=", TxtEmployeeNameStation.Text, "string" },
                { "CodeSenderAddress", "=", txtBlockIDStation.Text, "string" },
                { "DeptID", "=", cmbDept.SelectedValue.ToString() == "0"?"":cmbDept.SelectedValue.ToString(), "int" },
                { "WorkTypeID", "=", ddlWorkTypeStation.SelectedValue.ToString() == "0"?"":ddlWorkTypeStation.SelectedValue.ToString(), "int" },
                { "InTime", ">=", dtStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "string" },
                { "InTime", "<=", dtEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "string" }
            };

            return(rtbll.SelectWhere(strArray, 1));
        }
Exemplo n.º 9
0
        public string GetWhere()
        {
            string[,] strArray = null;
            strArray           = new string[6, 4] {
                { "EmpName", "=", TxtEmployeeNameStation.Text, "string" },
                { "CodeSenderAddress", "=", txtBlockIDStation.Text, "string" },
                { "AreaTypeName", "=", cmbAreaType.Text == "所有"?"":cmbAreaType.Text, "string" },
                { "AreaName", "=", cmbAreaName.Text == "所有"?"":cmbAreaName.Text, "string" },
                { "InTime", ">=", dtStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "string" },
                { "InTime", "<=", dtEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "string" }
            };

            return(rtbll.SelectWhere(strArray, 1));
        }
Exemplo n.º 10
0
        /// <summary>
        /// 组织查询条件
        /// </summary>
        /// <returns></returns>
        private string strWhere()
        {
            string[,] strArray = null;


            /*
             * 这边有疑问
             */

            strArray = new string[6, 4] {
                { "his.InTime", ">", dtStartTime.Text, "string" },
                { "his.InTime", "<", dtEndTime.Text, "string" },
                { "enc.DeptID", "=", cmbDept.SelectedValue.ToString() == "0"?"":cmbDept.SelectedValue.ToString(), "int" },
                { "enc.DutyID", "=", cmbDutyName.SelectedValue.ToString() == "0"?"":cmbDutyName.SelectedValue.ToString(), "int" },
                { "his.CodeSenderAddress", "=", txtSendCoderAddress.Text, "int" },
                { "ei.EmpName", "=", txtName.Text, "string" }
            };

            return(rtbll.SelectWhere(strArray, 1));
        }
Exemplo n.º 11
0
        /// <summary>
        /// 组织查询条件
        /// </summary>
        /// <returns></returns>
        private string strWhere()
        {
            string[,] strArray = null;


            /*
             * 这边有疑问
             */

            strArray = new string[6, 4] {
                { "hio.InTerritorialTime", ">", dtStartTime.Text, "string" },
                { "hio.InTerritorialTime", "<", dtEndTime.Text, "string" },
                { "ewt.WorkTypeID", "=", cmbWorkType.SelectedValue.ToString() == "0"?"":cmbWorkType.SelectedValue.ToString(), "int" },
                { "t.TerritorialID", "=", cmbArea.SelectedValue.ToString() == "0"?"":cmbArea.SelectedValue.ToString(), "int" },
                { "hio.CodeSenderAddress", "=", txtSendCoderAddress.Text, "int" },
                { "ei.EmpName", "=", txtName.Text, "string" }
            };

            return(rtbll.SelectWhere(strArray, 1));
        }
        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));
        }