/// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HCSSM_set_release_result_Load(object sender, EventArgs e)
        {
            InitializeButtonImage();
            SetTypeCbxItem();
            InitalizeResultCombox();
            //typeCbx.SelectedValue = _result_type;
            SetTypeCbxValue(typeCbx, _result_type);
            SortedList condition = new SortedList();
            //装载灭菌器
            string str_load_wf = CnasBaseDataHelper.Wf_SingleValue("HCS-procedure-data", "Load_sterilizer_container_wf");
            //释放灭菌器
            string str_release_wf = CnasBaseDataHelper.Wf_SingleValue("HCS-procedure-data", "Release_sterilizer_wf");

            condition.Add(1, str_load_wf);
            condition.Add(2, str_release_wf);
            condition.Add(3, _bcuCode);
            CnasRemotCall reCnasRemotCall = new CnasRemotCall();
            //string testSql = reCnasRemotCall.RemotInterface.CheckSelectData("HCS-workset-sec034", condition);
            DataTable data = reCnasRemotCall.RemotInterface.SelectData("HCS-workset-sec034", condition);

            if (data != null && data.Rows.Count > 0)
            {
                DataRow row          = data.Rows[0];
                string  str_id       = Convert.ToString(row["id"]);
                string  str_batchNum = Convert.ToString(row["device_runtimes"]);
                setNameTxt.Text  = Convert.ToString(row["set_name"]);              //包名
                setCodeTxt.Text  = Convert.ToString(row["BCU_code"]);              //保外标签
                machineTxt.Text  = Convert.ToString(row["ca_name"]);               //机器名称
                batchNumTxt.Text = str_batchNum;
                //container_code 机器码
                string match_code = Convert.ToString(row["container_code"]);
                string str_result = Convert.ToString(row["result"]);                 //监测结果
                remarkTxt.Text = Convert.ToString(row["remark"]);
                SetTypeCbxValue(resultCbx, str_result);
                if (!string.IsNullOrEmpty(str_batchNum))
                {
                    Thread thread = new Thread(() =>
                    {
                        List <Image> setImages = GetImages(reCnasRemotCall, match_code, str_batchNum);
                        this.Invoke(new Action(() =>
                        {
                            pictureBoxData.Images = setImages;
                        }));
                    });
                    thread.Start();
                }
                else
                {
                    ErrorClose();
                }
            }
            else
            {
                ErrorClose();
            }
        }
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="getOrderValue"></param>
        /// <param name="getCustValue"></param>
        /// <param name="bccOrBcu">订单编号</param>
        /// <param name="getLocationVAlue"></param>
        private void LoadData(string getOrderValue, string getCustValue, string bccOrBcu, string getLocationVAlue)
        {
            dgv_OrderDetail.Rows.Clear();
            CnasRemotCall reCnasRemotCall    = new CnasRemotCall();
            string        orderStr           = string.Empty;
            string        otherStr           = string.Empty;
            string        workSetTempwf_code = CnasBaseDataHelper.Wf_SingleValue("HCS-procedure-data", "Order_without_entity_wf");
            //custmoer
            bool isAllCust     = getCustValue == "0" || string.IsNullOrEmpty(getCustValue);
            bool isAllLocation = string.IsNullOrEmpty(getLocationVAlue) || getLocationVAlue.Equals("0");

            //custmoer
            if (_inappid == "1050")
            {
                //custmoer
                if (isAllCust)                //使用区则所配的医院barcode
                {
                    string customerArrange = OrderHelper.GetDicToArrangeStr(_customerDic);
                    otherStr += " and hcs_customer.bar_code in ('" + customerArrange + "') ";                                             //需要改 是一个范围
                    //此处未过滤locationid 暂未改
                    if (isAllLocation)                                                                                                    //使用区所匹配的使用地点id
                    {
                        Dictionary <string, string> dic = OrderHelper.GetAllHandleLocation(getCustValue, _inappid == "1050", true, true); //该处可成为私有变量放在界面初始化
                        string locationArrange          = OrderHelper.GetDicToArrangeStr(dic);
                        otherStr += " and orderIdSet.location_id in ('" + locationArrange + "') ";                                        //需要改 是一个范围
                    }
                }
                //custmoer
                if (!isAllCust)
                {
                    otherStr += " and hcs_customer.bar_code='" + getCustValue + "' ";
                    //location
                    if (isAllLocation)                    //使用区所匹配的使用地点id
                    {
                        string locationArrange = OrderHelper.GetDicToArrangeStr(_locationDic);
                        otherStr += " and orderIdSet.location_id in ('" + locationArrange + "') ";                        //需要改 是一个范围
                    }
                    //location
                    if (!isAllLocation)
                    {
                        otherStr += " and orderIdSet.location_id='" + getLocationVAlue + "' ";
                    }
                }
            }
            else
            {
                //custmoer
                if (!isAllCust)
                {
                    otherStr += " and hcs_customer.bar_code='" + getCustValue + "' ";
                }
                //location
                if (!isAllLocation)
                {
                    otherStr += " and orderIdSet.location_id='" + getLocationVAlue + "' ";
                }
            }
            //ordertype
            if (!string.IsNullOrEmpty(getOrderValue) && !getOrderValue.Equals("0"))
            {
                otherStr += " and  LEFT(orderSet.set_code,5)='" + getOrderValue.Trim() + "' ";
            }
            //orderCode
            if (!string.IsNullOrEmpty(bccOrBcu))
            {
                orderStr += " and set_code like '%" + bccOrBcu + "%'";
            }
            DateTime creStartValue = creStartTime.Value;
            DateTime creEndValue   = creEndTime.Value;

            if (_isFirst)
            {
                creStartValue = new DateTime(1900, 1, 1);
                creEndValue   = DateTime.Now;
            }
            SortedList condition = new SortedList();

            condition.Add(1, creEndValue);
            condition.Add(2, creStartValue);
            condition.Add(3, orderStr);
            condition.Add(4, workSetTempwf_code);
            condition.Add(5, otherStr);
#if DEBUG
            string testDataSql = reCnasRemotCall.RemotInterface.CheckSelectData("hcs_work_specialset_info-sec022", condition);
#endif
            DataTable data = reCnasRemotCall.RemotInterface.SelectData("hcs_work_specialset_info-sec022", condition);
            if (data != null && data.Rows.Count > 0)
            {
                for (int i = 0; i < data.Rows.Count; i++)
                {
                    DataRow row          = data.Rows[i];
                    int     index        = dgv_OrderDetail.Rows.Add();
                    string  tempSet_Code = Convert.ToString(row["set_code"]);
                    dgv_OrderDetail.Rows[index].Cells["batch"].Value        = Convert.ToString(row["batch"]);
                    dgv_OrderDetail.Rows[index].Cells["cu_name"].Value      = Convert.ToString(row["cu_name"]);
                    dgv_OrderDetail.Rows[index].Cells["u_uname"].Value      = Convert.ToString(row["u_uname"]);
                    dgv_OrderDetail.Rows[index].Cells["order_type"].Value   = tempSet_Code.Length > 4 ? InitDgvDataOrderType(tempSet_Code.Substring(0, 5)) : InitDgvDataOrderType(tempSet_Code);
                    dgv_OrderDetail.Rows[index].Cells["set_code"].Value     = Convert.ToString(row["set_code"]);
                    dgv_OrderDetail.Rows[index].Cells["ca_name"].Value      = Convert.ToString(row["ca_name"]);
                    dgv_OrderDetail.Rows[index].Cells["handle_state"].Value = OrderHelper.GetHandleStateType(Convert.ToString(row["handle_state"]));
                    dgv_OrderDetail.Rows[index].Cells["user_name"].Value    = Convert.ToString(row["user_name"]);
                    dgv_OrderDetail.Rows[index].Cells["cre_date"].Value     = row["cre_date"];
                }
                dgv_OrderDetail.ClearSelection();
            }
        }