protected void JudgeDevType(string coalCode, string devType, string devName, string devAddress, string startTime, string endTime)
        {
            BindData mockbind = new BindData();
            mockbind.CoalCode = coalCode;
            mockbind.StartTime = DateTime.Parse(startTime);
            mockbind.EndTime = DateTime.Parse(endTime);

            if (devType == "模拟量")
            {
                mockbind.Gv = gdv_MockData;
                mockbind.Anpager = anp_MockData;
                mockbind.QueryCategory = "mock";
                mockbind.QueryWhere = GetQueryWhere(devType, devName, devAddress);
                mockbind.QueryOrder = "DevPK";
                mockbind.BindGridView();
                pnlMockData.Visible = true;
                pnlSwitchData.Visible = false;
                gdv_MockData.Visible = true;
                anp_MockData.Visible = true;
                gdv_SwitchData.Visible = false;
                anp_SwitchData.Visible = false;
            }
            if (devType == "开关量")
            {
                mockbind.Gv = gdv_SwitchData;
                mockbind.Anpager = anp_SwitchData;
                mockbind.QueryCategory = "switch";
                mockbind.QueryWhere = GetQueryWhere(devType, devName, devAddress);
                mockbind.QueryOrder = "DevPK";
                mockbind.BindGridView();
                pnlMockData.Visible = false;
                pnlSwitchData.Visible = true;
                gdv_MockData.Visible = false;
                anp_MockData.Visible = false;
                gdv_SwitchData.Visible = true;
                anp_SwitchData.Visible = true;
            }
            //else
            //{
            //    JudgeDevType(coalCode, "模拟量", dev, startTime, endTime);
            //    JudgeDevType(coalCode, "开关量", dev, startTime, endTime);
            //    pnlMockData.Visible = true;
            //    pnlSwitchData.Visible = true;
            //    gdv_MockData.Visible = true;
            //    anp_MockData.Visible = true;
            //    gdv_SwitchData.Visible = true;
            //    anp_SwitchData.Visible = true;
            //}
        }
        protected void BindSwitchData()
        {
            BindData mockbind = new BindData();
            mockbind.Gv = gdv_SwitchData;
            mockbind.Anpager = anp_SwitchData;
            mockbind.CoalCode = ddlCoal.SelectedValue;

            mockbind.StartTime = Convert.ToDateTime(txtStartTime.Text);
            mockbind.EndTime = Convert.ToDateTime(txtEndTime.Text);
            mockbind.QueryCategory = "switch";
            mockbind.QueryWhere = GetQueryWhere(ddlDevType, ddlDev);
            mockbind.QueryOrder = "DevPK";

            mockbind.BindGridView();
        }