protected void Page_Load(object sender, EventArgs e)
    {
        //定义结果
        string strResult = "";

        if (!IsPostBack)
        {
            if (Request.QueryString["type"] == "check")
            {
                var UserNo = Request.QueryString["UserNo"];//有两个UserNo???等解决
                UserNo = UserNo.Split(',').Count() > 1 ? UserNo.Split(',')[1] : UserNo;
                UserNo = UserNo.Trim(',');

                var workID = Convert.ToInt32(Request.QueryString["OID"]);//OID为流程ID

                var strSubTaskID = CCFlowFacade.GetFlowIdentification(UserNo, workID).Split('|')[0];

                //获取现场项目
                DataTable dtSampleItem = new TMisMonitorResultLogic().SelectSampleItemWithSubtaskID(strSubTaskID);

                if (dtSampleItem.Rows.Count > 0)
                {
                    TMisMonitorSubtaskAppVo objSubtaskAppVo = new TMisMonitorSubtaskAppVo();
                    objSubtaskAppVo.SUBTASK_ID = strSubTaskID;
                    objSubtaskAppVo            = new TMisMonitorSubtaskAppLogic().Details(objSubtaskAppVo);

                    //objSubtaskAppVo.SAMPLING_CHECK = "administrator";//临时测试

                    if (!string.IsNullOrEmpty(objSubtaskAppVo.SAMPLING_CHECK))
                    {
                        //TSysUserVo objUserVo = new TSysUserLogic().Details(objSubtaskAppVo.SAMPLING_CHECK);

                        //var childFlowID = System.Configuration.ConfigurationManager.AppSettings["XCSSH"].ToString().Trim(',');
                        //var childNodeID = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["XCSSHJNode"]);

                        //CCFlowFacade.Node_CreateBlankWork(UserNo, childFlowID, UserNo, null, workID, fid, flowId, nodeId, UserNo, childNodeID, objUserVo.USER_NAME.Trim(','), "@GroupMark=" + strSubTaskID);
                    }
                    else
                    {
                        Response.Write("false没有指定现场项目复核人,不能发送");
                        Response.ContentType     = "text/plain";
                        Response.ContentEncoding = Encoding.UTF8;
                        Response.End();
                    }

                    //yinchengyi 2015-4-24 打开页面时 记录ccflow流程ID信息到业务系统数据库
                    //TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskVo();
                    //objSubtaskVo.ID = strSubTaskID;
                    //objSubtaskVo.CCFLOW_ID1 = workID.ToString();
                    //objSubtaskVo.CCFLOW_ID2 = fid.ToString();
                    //if (!new TMisMonitorSubtaskLogic().Edit(objSubtaskVo))
                    //{
                    //    Response.Write("false流程ID更新失败,不能发送");
                    //    Response.ContentType = "text/plain";
                    //    Response.ContentEncoding = Encoding.UTF8;
                    //    Response.End();
                    //}
                }

                //分析类现场项目判断
                var strTaskID = "";
                var FID       = Convert.ToInt64(Request.QueryString["FID"]);

                TMisContractPlanVo objPlanVo = new TMisContractPlanVo();
                objPlanVo.CCFLOW_ID1 = FID.ToString();
                objPlanVo            = new TMisContractPlanLogic().Details(objPlanVo);
                if (objPlanVo.ID.Length > 0 && objPlanVo.REAMRK1 == "1")
                {
                    //当前流程属于送样的
                    strTaskID = new TMisMonitorTaskLogic().Details(new TMisMonitorTaskVo {
                        PLAN_ID = objPlanVo.ID
                    }).ID;
                    strSubTaskID = "";
                }
                else
                {
                    strTaskID    = "";
                    strSubTaskID = CCFlowFacade.GetFlowIdentification(UserNo, workID).Split('|')[0];
                }

                DataTable dtInfo = new TMisMonitorResultLogic().getItemInfoBySubTaskID_MAS(strTaskID, strSubTaskID, true);
                for (int i = 0; i < dtInfo.Rows.Count; i++)
                {
                    if (dtInfo.Rows[i]["IS_ANYSCENE_ITEM"].ToString() == "1")
                    {
                        if (dtInfo.Rows[i]["USER_NAME"].ToString() == "")
                        {
                            Response.Write("false分析负责人信息没有选择完整,请检查");

                            Response.ContentType = "text/plain";
                            Response.End();
                        }
                    }
                }

                Response.Write("true");
                Response.ContentEncoding = Encoding.UTF8;
                Response.ContentType     = "text/plain";
                Response.End();
            }

            if (Request.QueryString["type"] == "AfterSuccessSend")
            {
                Response.ContentEncoding = Encoding.GetEncoding("gb2312");

                var UserNo = Request.QueryString["UserNo"];//有两个UserNo???等解决
                UserNo = UserNo.Split(',').Count() > 1 ? UserNo.Split(',')[1] : UserNo;


                var workID = Convert.ToInt32(Request.QueryString["OID"]);//OID为流程ID

                var flowId = Request.QueryString["FK_Flow"];
                var nodeId = Convert.ToInt32(Request.QueryString["FK_Node"]);
                var fid    = Convert.ToInt32(Request.QueryString["FID"]);

                var strSubTaskID = CCFlowFacade.GetFlowIdentification(UserNo, workID).Split('|')[0];

                //获取现场项目
                DataTable dtSampleItem = new TMisMonitorResultLogic().SelectSampleItemWithSubtaskID(strSubTaskID);

                if (dtSampleItem.Rows.Count > 0)
                {
                    TMisMonitorSubtaskAppVo objSubtaskAppVo = new TMisMonitorSubtaskAppVo();
                    objSubtaskAppVo.SUBTASK_ID = strSubTaskID;
                    objSubtaskAppVo            = new TMisMonitorSubtaskAppLogic().Details(objSubtaskAppVo);



                    if (!string.IsNullOrEmpty(objSubtaskAppVo.SAMPLING_CHECK))
                    {
                        TSysUserVo objUserVo = new TSysUserLogic().Details(objSubtaskAppVo.SAMPLING_CHECK);

                        var childFlowID = System.Configuration.ConfigurationManager.AppSettings["XCSSH"].ToString();
                        var childNodeID = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["XCSSHJNode"]);

                        var subTaskVo = new TMisMonitorSubtaskLogic().Details(strSubTaskID);

                        var taskVo = new TMisMonitorTaskLogic().Details(subTaskVo.TASK_ID);

                        var tempID = CCFlowFacade.Node_CreateBlankWork(UserNo, childFlowID, UserNo, null, workID, fid, flowId, nodeId, UserNo, childNodeID, objUserVo.USER_NAME, "@GroupMark=" + strSubTaskID);
                        CCFlowFacade.SetFlowTitle(UserNo, childFlowID, tempID, taskVo.PROJECT_NAME);
                    }
                }

                //创建分析类现场项目
                var strTaskID = "";
                var FID       = Convert.ToInt64(Request.QueryString["FID"]);

                UserNo = UserNo.Split(',').Count() > 1 ? UserNo.Split(',')[1] : UserNo;
                UserNo = UserNo.Trim(',');

                TMisContractPlanVo objPlanVo = new TMisContractPlanVo();
                objPlanVo.CCFLOW_ID1 = FID.ToString();
                objPlanVo            = new TMisContractPlanLogic().Details(objPlanVo);
                if (objPlanVo.ID.Length > 0 && objPlanVo.REAMRK1 == "1")
                {
                    //当前流程属于送样的
                    strTaskID = new TMisMonitorTaskLogic().Details(new TMisMonitorTaskVo {
                        PLAN_ID = objPlanVo.ID
                    }).ID;
                    strSubTaskID = "";
                }
                else
                {
                    strTaskID    = "";
                    strSubTaskID = CCFlowFacade.GetFlowIdentification(UserNo, workID).Split('|')[0];
                }

                var childFlowID3 = System.Configuration.ConfigurationManager.AppSettings["FXLXCXM"].ToString().Trim(',');
                var childNodeID3 = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["FXLXCXMJNode"]);//配置为跳转到分析室审核流程的第三个节点by lhm

                DataTable dtInfo = new TMisMonitorResultLogic().getItemInfoBySubTaskID_MAS(strTaskID, strSubTaskID, true);
                for (int i = 0; i < dtInfo.Rows.Count; i++)
                {
                    if (dtInfo.Rows[i]["USER_NAME"].ToString() == "")
                    {
                        Response.Write("false分析负责人信息没有选择完整,请检查");

                        Response.ContentType = "text/plain";
                        Response.End();
                    }

                    var itemVo    = new TBaseItemInfoLogic().Details(dtInfo.Rows[i]["ITEM_ID"].ToString());
                    var sampleVo  = new TMisMonitorSampleInfoLogic().Details(dtInfo.Rows[i]["SAMPLE_ID"].ToString());
                    var subtaskVO = new TMisMonitorSubtaskLogic().Details(sampleVo.SUBTASK_ID);
                    var taskVo    = new TMisMonitorTaskLogic().Details(subtaskVO.TASK_ID);

                    long workid = 0;
                    var  title  = string.Format("{0} {1}", taskVo.PROJECT_NAME, itemVo.ITEM_NAME);

                    if (dtInfo.Rows[i]["IS_ANYSCENE_ITEM"].ToString() == "1")  //分析类现场项目
                    {
                        workid = CCFlowFacade.Node_CreateBlankWork(UserNo, childFlowID3, UserNo, null, workID, fid, flowId, nodeId, UserNo, childNodeID3, dtInfo.Rows[i]["USER_NAME"].ToString().Trim(','), "@GroupMark=" + dtInfo.Rows[i]["RESULTID"].ToString().Trim(','));

                        CCFlowFacade.SetFlowTitle(Request["UserNo"].ToString(), childFlowID3, workid, title);
                    }
                }

                Response.Write("发送成功");
                Response.ContentType = "text/plain";
                Response.End();
            }



            if (!string.IsNullOrEmpty(Request.QueryString["DirectionType"]))
            {
                var type      = Request.QueryString["DirectionType"];
                var direction = Request.QueryString["Direction"];
                var UserNo    = Request.QueryString["UserNo"];
                var workID    = Request.QueryString["WorkId"];



                var strSubTaskID = CCFlowFacade.GetFlowIdentification(UserNo, Convert.ToInt64(workID)).Split('|')[0];

                switch (type)
                {
                case "type1":

                    //分析类现场项目在该环节创建时,该逻辑需要更改为是否存在分析类项目 by lhm
                    //DataTable dtSampleDept = new TMisMonitorResultLogic().SelectSampleDeptWithSubtaskID(strSubTaskID);//存在分析类项目和分析类现场项目
                    DataTable dtSampleDept = new TMisMonitorResultLogic().SelectSampleDeptWithSubtaskID2(strSubTaskID);    //存在分析类项目

                    if (direction == "d1")
                    {
                        if (dtSampleDept.Rows.Count == 0)
                        {
                            Response.Write("1");
                        }
                        else
                        {
                            Response.Write("0");
                        }
                    }
                    else if (direction == "d2")
                    {
                        if (dtSampleDept.Rows.Count > 0)
                        {
                            Response.Write("1");
                        }
                        else
                        {
                            Response.Write("0");
                        }
                    }
                    Response.End();
                    break;

                default:
                    Response.Write("0");
                    Response.End();
                    break;
                }
            }



            if (Request.QueryString["WorkID"] != null)
            {
                var workID = Convert.ToInt64(Request.QueryString["WorkID"]);

                ccflowWorkId = workID.ToString();
                ccflowFid    = Request.QueryString["FID"];



                var identification = CCFlowFacade.GetFlowIdentification(LogInfo.UserInfo.USER_NAME, workID).Split('|')[0];

                this.SUBTASK_ID.Value = identification;
                strSubTaskID          = identification;
                strSourceID           = identification;

                TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskLogic().Details(strSubTaskID);
                strMonitorID          = objSubtaskVo.MONITOR_ID;
                this.MONITOR_ID.Value = strMonitorID;

                TMisMonitorTaskVo objTask = new TMisMonitorTaskLogic().Details(objSubtaskVo.TASK_ID);
                this.PLAN_ID.Value = objTask.PLAN_ID;

                //yinchengyi 2015-4-24 打开页面时 记录ccflow流程ID信息到业务系统数据库
                //TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskVo();
                //objSubtaskVo.ID = strSubTaskID;
                objSubtaskVo.CCFLOW_ID1 = workID.ToString();
                objSubtaskVo.CCFLOW_ID2 = ccflowFid.ToString();
                if (!new TMisMonitorSubtaskLogic().Edit(objSubtaskVo))
                {
                    //todo_yinchengyi:
                }
            }
            if (!string.IsNullOrEmpty(Request.QueryString["strSubtaskID"]))
            {
                //监测子任务ID
                this.SUBTASK_ID.Value = Request.QueryString["strSubtaskID"].ToString();
            }

            //点位动态属性信息拷贝
            AttributeValueCopy();
            //样品编号
            //SetSampleCode();

            //委托书信息
            if (!string.IsNullOrEmpty(Request.QueryString["type"]) && Request.QueryString["type"] == "getContractInfo")
            {
                strResult = GetContractInfo();
                Response.Write(strResult);
                Response.End();
            }
            //获取现场复核人信息
            if (Request["type"] != null && Request["type"].ToString() == "GetCheckUser")
            {
                strResult = GetCheckUser(Request.QueryString["MonitorID"].ToString());
                Response.Write(strResult);
                Response.End();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request.QueryString["type"] == "check")
            {
                Response.ContentEncoding = Encoding.GetEncoding("gb2312");
                //Response.Write("false分析负责人信息没有选择完整,请检查");
                ////Response.ContentEncoding =  Encoding.UTF8  ;
                //Response.ContentEncoding = Encoding.GetEncoding("GB2312");

                //Response.ContentType = "text/plain";
                //Response.End();


                var strTaskID    = "";
                var strSubTaskID = "";
                var FID          = Convert.ToInt64(Request.QueryString["FID"]);

                var UserNo = Request.QueryString["UserNo"];
                UserNo = UserNo.Split(',').Count() > 1 ? UserNo.Split(',')[1] : UserNo;

                var workID = Convert.ToInt32(Request.QueryString["OID"]);//OID为流程ID

                TMisContractPlanVo objPlanVo = new TMisContractPlanVo();
                objPlanVo.CCFLOW_ID1 = FID.ToString();
                objPlanVo            = new TMisContractPlanLogic().Details(objPlanVo);
                if (objPlanVo.ID.Length > 0 && objPlanVo.REAMRK1 == "1")
                {
                    //当前流程属于送样的
                    strTaskID = new TMisMonitorTaskLogic().Details(new TMisMonitorTaskVo {
                        PLAN_ID = objPlanVo.ID
                    }).ID;
                    strSubTaskID = "";
                }
                else
                {
                    strTaskID    = "";
                    strSubTaskID = CCFlowFacade.GetFlowIdentification(UserNo, workID).Split('|')[0];
                }

                var flowId = Request.QueryString["FK_Flow"];
                var nodeId = Convert.ToInt32(Request.QueryString["FK_Node"]);
                var fid    = Convert.ToInt32(Request.QueryString["FID"]);

                var identification = CCFlowFacade.GetFlowIdentification(UserNo, Convert.ToInt64(workID));

                var sampleIdList = identification.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries).ToList();

                if (sampleIdList.Count > 0)
                {
                    sampleIdList.RemoveAt(0);
                }

                DataTable dtInfo = new TMisMonitorResultLogic().getItemInfoBySubTaskID_MAS(strTaskID, strSubTaskID, true);

                var newDT = new DataTable();

                foreach (DataColumn column in dtInfo.Columns)
                {
                    newDT.Columns.Add(column.ColumnName);
                }

                foreach (DataRow row in dtInfo.Rows)
                {
                    if (sampleIdList.Count == 0)
                    {
                        newDT.Rows.Add(row.ItemArray);
                    }
                    else if (sampleIdList.Contains(row["SampleID"].ToString()))
                    {
                        newDT.Rows.Add(row.ItemArray);
                    }
                }

                for (int i = 0; i < newDT.Rows.Count; i++)
                {
                    if (dtInfo.Rows[i]["USER_NAME"].ToString() == "")
                    {
                        Response.Write("false分析负责人信息没有选择完整,请检查");

                        Response.ContentType = "text/plain";
                        Response.End();
                    }
                }

                Response.Write("true");

                Response.ContentType = "text/plain";
                Response.End();
            }

            if (Request.QueryString["type"] == "checkAfter")
            {
                Response.ContentEncoding = Encoding.GetEncoding("gb2312");


                var strTaskID    = "";
                var strSubTaskID = "";
                var FID          = Convert.ToInt64(Request.QueryString["FID"]);

                var UserNo = Request.QueryString["UserNo"];
                UserNo = UserNo.Split(',').Count() > 1 ? UserNo.Split(',')[1] : UserNo;
                UserNo = UserNo.Trim(',');

                var workID = Convert.ToInt32(Request.QueryString["OID"]);//OID为流程ID

                TMisContractPlanVo objPlanVo = new TMisContractPlanVo();
                objPlanVo.CCFLOW_ID1 = FID.ToString();
                objPlanVo            = new TMisContractPlanLogic().Details(objPlanVo);
                if (objPlanVo.ID.Length > 0 && objPlanVo.REAMRK1 == "1")
                {
                    //当前流程属于送样的
                    strTaskID = new TMisMonitorTaskLogic().Details(new TMisMonitorTaskVo {
                        PLAN_ID = objPlanVo.ID
                    }).ID;
                    strSubTaskID = "";
                }
                else
                {
                    strTaskID    = "";
                    strSubTaskID = CCFlowFacade.GetFlowIdentification(UserNo, workID).Split('|')[0];
                }

                var flowId = Request.QueryString["FK_Flow"].Trim(',');
                var nodeId = Convert.ToInt32(Request.QueryString["FK_Node"]);
                var fid    = Convert.ToInt32(Request.QueryString["FID"]);

                var childFlowID = System.Configuration.ConfigurationManager.AppSettings["FXSSH"].ToString().Trim(',');
                var childNodeID = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["FXSSHJNode"]);

                var childFlowID2 = System.Configuration.ConfigurationManager.AppSettings["FXLXCXM"].ToString().Trim(',');
                var childNodeID2 = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["FXLXCXMJNode"]);

                var identification = CCFlowFacade.GetFlowIdentification(UserNo, Convert.ToInt64(workID));

                var sampleIdList = identification.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries).ToList();

                if (sampleIdList.Count > 0)
                {
                    sampleIdList.RemoveAt(0);
                }

                DataTable dtInfo = new TMisMonitorResultLogic().getItemInfoBySubTaskID_MAS(strTaskID, strSubTaskID, true);

                var newDT = new DataTable();

                foreach (DataColumn column in dtInfo.Columns)
                {
                    newDT.Columns.Add(column.ColumnName);
                }

                foreach (DataRow row in dtInfo.Rows)
                {
                    if (sampleIdList.Count == 0)
                    {
                        newDT.Rows.Add(row.ItemArray);
                    }
                    else if (sampleIdList.Contains(row["SampleID"].ToString()))
                    {
                        newDT.Rows.Add(row.ItemArray);
                    }
                }


                for (int i = 0; i < newDT.Rows.Count; i++)
                {
                    if (dtInfo.Rows[i]["USER_NAME"].ToString() == "")
                    {
                        Response.Write("false分析负责人信息没有选择完整,请检查");

                        Response.ContentType = "text/plain";
                        Response.End();
                    }

                    var itemVo    = new TBaseItemInfoLogic().Details(dtInfo.Rows[i]["ITEM_ID"].ToString());
                    var sampleVo  = new TMisMonitorSampleInfoLogic().Details(dtInfo.Rows[i]["SAMPLE_ID"].ToString());
                    var subtaskVO = new TMisMonitorSubtaskLogic().Details(sampleVo.SUBTASK_ID);
                    var taskVo    = new TMisMonitorTaskLogic().Details(subtaskVO.TASK_ID);

                    long workid = 0;
                    var  title  = string.Format("{0} {1}", taskVo.PROJECT_NAME, itemVo.ITEM_NAME);

                    if (dtInfo.Rows[i]["IS_ANYSCENE_ITEM"].ToString() == "1")  //分析类现场项目
                    {
                        //在采样实施环节创建
                        //workid = CCFlowFacade.Node_CreateBlankWork(UserNo, childFlowID2, UserNo, null, workID, fid, flowId, nodeId, UserNo, childNodeID2, dtInfo.Rows[i]["USER_NAME"].ToString().Trim(','), "@GroupMark=" + dtInfo.Rows[i]["RESULTID"].ToString().Trim(','));

                        //CCFlowFacade.SetFlowTitle(Request["UserNo"].ToString(), childFlowID2, workid, title);
                    }
                    else
                    {
                        workid = CCFlowFacade.Node_CreateBlankWork(UserNo, childFlowID, UserNo, null, workID, fid, flowId, nodeId, UserNo, childNodeID, dtInfo.Rows[i]["USER_NAME"].ToString().Trim(','), "@GroupMark=" + dtInfo.Rows[i]["RESULTID"].ToString().Trim(','));
                        CCFlowFacade.SetFlowTitle(Request["UserNo"].ToString(), childFlowID, workid, title);
                    }
                }


                Response.Write("发送成功");

                Response.ContentType = "text/plain";
                Response.End();
            }


            //定义结果
            string strResult = "";
            if (Request.QueryString["WorkID"] != null)
            {
                var FID = Convert.ToInt64(Request.QueryString["FID"]);

                TMisContractPlanVo objPlanVo = new TMisContractPlanVo();
                objPlanVo.CCFLOW_ID1 = FID.ToString();
                objPlanVo            = new TMisContractPlanLogic().Details(objPlanVo);

                this.PLAN_ID.Value = objPlanVo.ID;

                if (objPlanVo.ID.Length > 0 && objPlanVo.REAMRK1 == "1")
                {
                    //当前流程属于送样的
                    this.TASK_ID.Value = new TMisMonitorTaskLogic().Details(new TMisMonitorTaskVo {
                        PLAN_ID = objPlanVo.ID
                    }).ID;
                    this.SUBTASK_ID.Value = "";
                }
                else
                {
                    //当前流程属于采样的
                    var workID = Convert.ToInt64(Request.QueryString["WorkID"]);

                    var identification = CCFlowFacade.GetFlowIdentification(LogInfo.UserInfo.USER_NAME, workID).Split('|')[0];

                    this.SUBTASK_ID.Value = identification;
                    this.TASK_ID.Value    = "";
                }
            }
            //样品号信息
            if (Request["type"] != null && Request["type"].ToString() == "getSampleGridInfo")
            {
                strResult = getSampleGridInfo(Request["strTaskID"].ToString(), Request["strSubTaskID"].ToString());
                Response.Write(strResult);
                Response.End();
            }
            //监测项目信息
            if (Request["type"] != null && Request["type"].ToString() == "getItemGridInfo")
            {
                strResult = getItemGridInfo(Request["SampleID"].ToString());
                Response.Write(strResult);
                Response.End();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //如果是方向条件判断
        if (!string.IsNullOrEmpty(Request.QueryString["DirectionType"]))
        {
            var type      = Request.QueryString["DirectionType"];
            var direction = Request.QueryString["Direction"];

            var workID = Request.QueryString["WorkId"];  //获取CCLow主流程ID
            workID = workID ?? Int32.MinValue.ToString();

            TMisContractPlanVo objPlanVo = new TMisContractPlanVo();
            objPlanVo.CCFLOW_ID1 = workID;
            objPlanVo            = new TMisContractPlanLogic().Details(objPlanVo);
            switch (type)
            {
            case "type1":

                if (direction == "d1")
                {
                    if (objPlanVo.REAMRK1 == "0")
                    {
                        Response.Write("1");           //采样
                    }
                    else
                    {
                        Response.Write("0");           //送样
                    }
                }
                else if (direction == "d2")
                {
                    if (objPlanVo.REAMRK1 == "1")
                    {
                        Response.Write("1");           //送样
                    }
                    else
                    {
                        Response.Write("0");           //采样
                    }
                }
                Response.End();
                break;

            default:
                Response.Write("0");
                Response.End();
                break;
            }
        }

        //如果是发送成功事件
        if (Request["type"] != null && Request["type"].ToString() == "AfterSuccessSend")
        {
            Response.ContentEncoding = Encoding.GetEncoding("gb2312");

            var workID = Request.QueryString["OID"];     //当前流程ID

            var task = new TMisMonitorTaskLogic().Details(new TMisMonitorTaskVo {
                CCFLOW_ID1 = workID
            });

            var title = string.Format("{0}-{1}", task.PROJECT_NAME, task.CONTRACT_CODE);

            CCFlowFacade.SetFlowTitle(Request["UserNo"].ToString(), Request["FK_Flow"].ToString(), Convert.ToInt64(workID), title);

            Response.Write("发送成功");

            Response.ContentType = "text/plain";
            Response.End();
        }
    }