Exemple #1
0
    public static string discontinued(string strValue)
    {
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoLogic().Details(strValue);
        string strSubTaskID = objSample.SUBTASK_ID;
        bool   isSuccess    = new TMisContractPlanPointLogic().DelPlanPointForSampleDistr(objSample.POINT_ID);

        if (isSuccess)
        {
            isSuccess = new TMisMonitorTaskPointLogic().Delete(objSample.POINT_ID);
            isSuccess = new TMisMonitorSampleInfoLogic().Delete(strValue);
            TMisMonitorResultVo objResult = new TMisMonitorResultVo();
            objResult.SAMPLE_ID = strValue;
            isSuccess           = new TMisMonitorResultLogic().Delete(objResult);
        }
        TMisMonitorTaskPointVo objTaskPoint = new TMisMonitorTaskPointVo();

        objTaskPoint.SUBTASK_ID = strSubTaskID;
        DataTable dt = new TMisMonitorTaskPointLogic().SelectByTable(objTaskPoint);

        if (dt.Rows.Count == 0)
        {
            new TMisMonitorSubtaskLogic().Delete(strSubTaskID);
            return("2");
        }

        return(isSuccess == true ? "1" : "0");
    }
Exemple #2
0
    /// <summary>
    /// 获取监测项目类别信息
    /// </summary>
    /// <returns></returns>
    private string getTwoGridInfo(string strOneGridId)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int       intPageSize = Convert.ToInt32(Request.Params["pagesize"]);
        DataTable dt          = new TMisMonitorResultLogic().getSimpleCodeInResult_QY(strOneGridId, LogInfo.UserInfo.ID, "20");

        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            TMisMonitorSampleInfoVo objSampleInfoVo = new TMisMonitorSampleInfoLogic().Details(dt.Rows[i]["SAMPLE_ID"].ToString());
            TMisMonitorSubtaskVo    objSubtaskVo    = new TMisMonitorSubtaskLogic().Details(objSampleInfoVo.SUBTASK_ID);

            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = objSubtaskVo.TASK_ID;
            objReturnInfoVo.SUBTASK_ID     = objSubtaskVo.ID;
            objReturnInfoVo.RESULT_ID      = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_008;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_007;
            objReturnInfoVo = new TMisReturnInfoLogic().Details(objReturnInfoVo);

            dt.Rows[i]["REMARK_1"] = objReturnInfoVo.SUGGESTION;
        }

        string strJson = CreateToJson(dt, dt.Rows.Count);

        return(strJson);
    }
    //获取点位信息
    private string getPointList()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        if (strSortname == null || strSortname.Length < 0)
        {
            strSortname = TMisMonitorTaskPointVo.NUM_FIELD;
        }

        if (this.SUBTASK_ID.Value.Length == 0)
        {
            return("");
        }

        if (this.MONITOR_ID.Value.Trim() == "FunctionNoise")
        {
            //如果是功能区噪声需要按一天24小时拆分样品
            SplitFunctionNoiseByHour(this.SUBTASK_ID.Value.Trim());
        }

        TMisMonitorSampleInfoVo objSampleInfo = new TMisMonitorSampleInfoVo();

        objSampleInfo.SUBTASK_ID = this.SUBTASK_ID.Value;
        objSampleInfo.QC_TYPE    = "0";
        objSampleInfo.SORT_FIELD = "POINT_ID";
        objSampleInfo.SORT_TYPE  = "asc";
        DataTable dtSample = new DataTable();
        DataTable dt       = new TMisMonitorSampleInfoLogic().SelectByTable(objSampleInfo, intPageIndex, intPageSize);

        string strUnit = "";

        if (this.MONITOR_ID.Value.Trim() == "000000004")
        {
            strUnit = "dB(A)";
        }

        dtSample = new TMisMonitorSubtaskLogic().getItemBySubTaskID(this.SUBTASK_ID.Value.Trim());
        for (int i = 0; i < dtSample.Rows.Count; i++)
        {
            dt.Columns.Add(dtSample.Rows[i]["ID"].ToString() + "@@" + dtSample.Rows[i]["ITEM_NAME"].ToString() + strUnit, typeof(string));
        }
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dtSample = new TMisMonitorSubtaskLogic().getItemValueBySampleID(dt.Rows[i]["ID"].ToString());
            for (int j = 0; j < dtSample.Rows.Count; j++)
            {
                dt.Rows[i][dtSample.Rows[j]["ID"].ToString() + "@@" + dtSample.Rows[j]["ITEM_NAME"].ToString() + strUnit] = dtSample.Rows[j]["ITEM_RESULT"].ToString();
            }
        }

        int    intTotalCount = new TMisMonitorSampleInfoLogic().GetSelectResultCount(objSampleInfo);
        string strJson       = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
    //点位
    private void GetPoint_UnderTask(string strContractID, string strSubTaskID, ref string strPointNames, ref string strFREQ, ref string strItemS)
    {
        TMisMonitorSampleInfoVo objSampleInfo = new TMisMonitorSampleInfoVo();

        objSampleInfo.SUBTASK_ID = strSubTaskID;
        DataTable dt = new TMisMonitorSampleInfoLogic().SelectByTableForPoint(objSampleInfo, 0, 0);

        string strtmpPointNameS = "";
        string strtmpItems      = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            TMisMonitorTaskPointVo objTaskPoint = new TMisMonitorTaskPointLogic().Details(dt.Rows[i]["POINT_ID"].ToString());
            if (!strtmpPointNameS.Contains(objTaskPoint.POINT_NAME))
            {
                strtmpPointNameS += (strtmpPointNameS.Length > 0 ? "、" : "") + objTaskPoint.POINT_NAME;

                GetItem_UnderSample(dt.Rows[i]["ID"].ToString(), objTaskPoint.POINT_NAME, ref strtmpItems);

                TMisContractPointVo objContractPointVo = new TMisContractPointVo();
                objContractPointVo = new TMisContractPointLogic().Details(objTaskPoint.CONTRACT_POINT_ID);
                strFREQ           += (strFREQ.Length > 0 ? "\n" : "") + objTaskPoint.POINT_NAME + ":连续" + (objContractPointVo.SAMPLE_DAY == "" ? "1" : objContractPointVo.SAMPLE_DAY) + "天,每天" + (objContractPointVo.SAMPLE_FREQ == "" ? "1" : objContractPointVo.SAMPLE_FREQ) + "次";
            }
        }

        strItemS      += (strItemS.Length > 0 ? "\n" : "") + strtmpItems;
        strPointNames += (strPointNames.Length > 0 ? "\r\n" : "") + strtmpPointNameS;
    }
Exemple #5
0
    /// <summary>
    /// 获取样品信息
    /// </summary>
    /// <returns></returns>
    private string getSampleGridInfo(string strResultID)
    {
        //string strSortname = Request.Params["sortname"];
        //string strSortorder = Request.Params["sortorder"];
        ////当前页面
        //int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        ////每页记录数
        //int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        //DataTable dt = new DataTable();
        //int intTotalCount = 0;

        //TMisMonitorResultVo objResultVo = new TMisMonitorResultVo();
        //objResultVo.ID = strResultID;
        //objResultVo = new TMisMonitorResultLogic().Details(objResultVo);
        //dt = new TMisMonitorSampleInfoLogic().SelectByTable(new TMisMonitorSampleInfoVo() { ID = objResultVo.SAMPLE_ID });

        //string strJson = CreateToJson(dt, dt.Rows.Count);
        //return strJson;

        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        DataTable           dt            = new DataTable();
        int                 intTotalCount = 0;
        TMisMonitorResultVo objResultVo   = new TMisMonitorResultVo();

        if (strResultID.IndexOf(",") >= 0)
        {
            strResultID = strResultID.Substring(strResultID.IndexOf(",") + 1);
            strResultID = "'" + strResultID + "'";
            strResultID = strResultID.Replace(",", "','");
            DataTable dt1          = new TMisMonitorResultLogic().Details1(strResultID);
            string    strResultID1 = "";
            for (int i = 0; i < dt1.Rows.Count; i++)
            {
                strResultID1 = strResultID1 + "," + dt1.Rows[i]["SAMPLE_ID"].ToString();
            }
            strResultID1 = strResultID1.Substring(strResultID1.IndexOf(",") + 1);
            strResultID1 = "'" + strResultID1 + "'";
            strResultID1 = strResultID1.Replace(",", "','");
            dt           = new TMisMonitorSampleInfoLogic().SelectByTable1(strResultID1);
        }
        else
        {
            objResultVo.ID = strResultID;
            objResultVo    = new TMisMonitorResultLogic().Details(objResultVo);
            dt             = new TMisMonitorSampleInfoLogic().SelectByTable(new TMisMonitorSampleInfoVo()
            {
                ID = objResultVo.SAMPLE_ID
            });
        }
        string strJson = CreateToJson(dt, dt.Rows.Count);

        return(strJson);
    }
    public static string AddSample(string strSampleID)
    {
        bool IsSuccess = false;

        //获取原始样信息
        TMisMonitorSampleInfoVo TMisMonitorSampleInfoVo = new TMisMonitorSampleInfoLogic().Details(strSampleID);
        //根据原始样获取监测结果ID
        TMisMonitorResultVo TMisMonitorResultVo = new TMisMonitorResultVo();

        TMisMonitorResultVo.SAMPLE_ID = TMisMonitorSampleInfoVo.ID;
        List <TMisMonitorResultVo> resultList = new TMisMonitorResultLogic().SelectByObject(TMisMonitorResultVo, 0, 1000000);

        string strNewSampleId = GetSerialNumber("MonitorSampleId");

        TMisMonitorSampleInfoVo.ID = strNewSampleId;
        new TMisMonitorSampleInfoLogic().Create(TMisMonitorSampleInfoVo);

        foreach (TMisMonitorResultVo TMisMonitorResultTemp in resultList)
        {
            string strOldResultId = TMisMonitorResultTemp.ID;
            string strNewResultId = GetSerialNumber("MonitorResultId");
            TMisMonitorResultTemp.ID        = strNewResultId;
            TMisMonitorResultTemp.SAMPLE_ID = strNewSampleId;
            new TMisMonitorResultLogic().Create(TMisMonitorResultTemp);

            TMisMonitorResultAppVo TMisMonitorResultAppVo = new TMisMonitorResultAppVo();
            TMisMonitorResultAppVo.RESULT_ID = strOldResultId;
            TMisMonitorResultAppVo TMisMonitorResultAppVoTemp = new TMisMonitorResultAppLogic().SelectByObject(TMisMonitorResultAppVo);
            TMisMonitorResultAppVoTemp.ID        = GetSerialNumber("MonitorResultAppId");
            TMisMonitorResultAppVoTemp.RESULT_ID = strNewResultId;
            new TMisMonitorResultAppLogic().Create(TMisMonitorResultAppVoTemp);
        }
        return(IsSuccess == true ? "1" : "0");
    }
    /// <summary>
    /// 获取样品信息
    /// </summary>
    /// <returns></returns>
    private string getThreeGridInfo(string strTwoGridId)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int       intPageSize   = Convert.ToInt32(Request.Params["pagesize"]);
        DataTable dt            = new DataTable();
        int       intTotalCount = 0;
        //如果子任务是分支任务
        string strRemark = new TMisMonitorSubtaskLogic().Details(strTwoGridId).REMARK1;

        if (!string.IsNullOrEmpty(strRemark))
        {
            dt            = new TMisMonitorSampleInfoLogic().getSamplingForSampleItem(strTwoGridId, "022", intPageIndex, intPageSize);
            intTotalCount = new TMisMonitorSampleInfoLogic().getSamplingCountForSampleItem(strTwoGridId, "022");
        }
        else
        {
            dt            = new TMisMonitorSampleInfoLogic().getSamplingForSampleItemOne(strTwoGridId, "022", intPageIndex, intPageSize);
            intTotalCount = new TMisMonitorSampleInfoLogic().getSamplingCountForSampleItemOne(strTwoGridId, "022");
        }
        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Exemple #8
0
    public static bool QcSave(string strSampleID, string strQcType, string strItemId)
    {
        deleteSampleInfo(strSampleID, strQcType);
        bool isSuccess = true;

        if (strItemId == "")
        {
            return(isSuccess);
        }

        string strSourceResultId = "";
        //添加现场空白样
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoLogic().Details(strSampleID);

        objSample.ID                    = GetSerialNumber("MonitorSampleId");
        objSample.QC_TYPE               = strQcType;
        objSample.QC_SOURCE_ID          = strSampleID;
        objSample.SAMPLE_CODE           = GetSampleCode(strSampleID);
        objSample.SAMPLECODE_CREATEDATE = DateTime.Now.ToString("yyyy-MM-dd");
        objSample.SAMPLE_NAME          += "现场空白";
        if (!new TMisMonitorSampleInfoLogic().Create(objSample))
        {
            isSuccess = false;
        }

        for (int i = 0; i < strItemId.Split(',').Length; i++)
        {
            //根据监测项目查询原始样结果表信息
            TMisMonitorResultVo objResult = new TMisMonitorResultVo();
            objResult.SAMPLE_ID = strSampleID;
            objResult.QC_TYPE   = "0";
            objResult.ITEM_ID   = strItemId.Split(',')[i];
            objResult           = new TMisMonitorResultLogic().Details(objResult);

            //根据监测项目将空白样信息添加到结果表中
            strSourceResultId      = objResult.ID;
            objResult.ID           = GetSerialNumber("MonitorResultId");
            objResult.SAMPLE_ID    = objSample.ID;
            objResult.QC_TYPE      = strQcType;
            objResult.QC_SOURCE_ID = strSourceResultId;
            objResult.SOURCE_ID    = strSourceResultId;
            objResult.QC           = "###";
            if (!new TMisMonitorResultLogic().Create(objResult))
            {
                isSuccess = false;
            }
            InsertResultAPP(objResult.ID);

            //将空白信息添加到现场空白结果表中
            TMisMonitorQcEmptyOutVo objQcEmpty = new TMisMonitorQcEmptyOutVo();
            objQcEmpty.ID              = GetSerialNumber("QC_EMPTY_OUT");
            objQcEmpty.RESULT_ID_SRC   = strSourceResultId;
            objQcEmpty.RESULT_ID_EMPTY = objResult.ID;
            if (!new TMisMonitorQcEmptyOutLogic().Create(objQcEmpty))
            {
                isSuccess = false;
            }
        }
        return(isSuccess);
    }
Exemple #9
0
    /// <summary>
    /// 获得包含现场项目的点位信息
    /// </summary>
    /// <returns>Json</returns>
    protected string GetPointInfo()
    {
        var strCCflowWorkId = Request.QueryString["strCCflowWorkId"];
        var identification  = CCFlowFacade.GetFlowIdentification(LogInfo.UserInfo.USER_NAME, Convert.ToInt64(strCCflowWorkId));

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

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

        DataTable dt            = new TMisMonitorTaskPointLogic().SelectSampleDeptPoint(this.SUBTASK_ID.Value, "1,2", sampleIdList: sampleIdList);
        int       intTotalCount = dt.Rows.Count;

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoVo();
            objSample.POINT_ID   = dt.Rows[i]["ID"].ToString();
            objSample.SUBTASK_ID = this.SUBTASK_ID.Value;
            objSample            = new TMisMonitorSampleInfoLogic().Details(objSample);

            dt.Rows[i]["REMARK1"] = objSample.SAMPLE_CODE;
            dt.Rows[i]["REMARK2"] = objSample.SAMPLE_NAME;
        }
        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Exemple #10
0
    /// <summary>
    /// 发送到下一环节
    /// </summary>
    /// <param name="strTaskId">任务ID</param>
    /// <returns></returns>
    public string SendToNext(string strTaskId)
    {
        bool IsSuccess = true;
        //把样品从交接发送到分配环节
        DataTable dtSample = new TMisMonitorSampleInfoLogic().getSamplingAllocationSheet_QHD(strTaskId, "", "021,02");

        for (int i = 0; i < dtSample.Rows.Count; i++)
        {
            TMisMonitorSampleInfoVo objSampleVo = new TMisMonitorSampleInfoVo();
            objSampleVo.ID       = dtSample.Rows[i]["ID"].ToString();
            objSampleVo.NOSAMPLE = "2";
            IsSuccess            = new TMisMonitorSampleInfoLogic().Edit(objSampleVo);
        }
        //如果子任务的样品都采样完,刚更新子任务的状态
        DataTable dt = new TMisMonitorResultLogic().getItemTypeInfo_QHD(strTaskId, "021", "01", "2", true);

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string strMonitorID = dt.Rows[i]["MONITOR_ID"].ToString();
            TMisMonitorSubtaskVo objSsubtask = new TMisMonitorSubtaskVo();
            objSsubtask.TASK_ID          = strTaskId;
            objSsubtask.MONITOR_ID       = strMonitorID;
            objSsubtask                  = new TMisMonitorSubtaskLogic().Details(objSsubtask);
            objSsubtask.SAMPLE_ACCESS_ID = LogInfo.UserInfo.ID;
            objSsubtask.TASK_STATUS      = "03";
            if (!new TMisMonitorSubtaskLogic().Edit(objSsubtask))
            {
                IsSuccess = false;
            }
        }

        return(IsSuccess == true ? "1" : "0");
    }
    /// <summary>
    /// 获得点位信息
    /// </summary>
    /// <returns></returns>
    protected string GetSampleInfo()
    {
        int intTotalCount = 0;
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int       intPageSize     = Convert.ToInt32(Request.Params["pagesize"]);
        DataTable dt              = new DataTable();//结果集
        string    strTaskID       = !string.IsNullOrEmpty(Request.QueryString["id"]) ? Request.QueryString["id"].ToString() : "";
        string    strContractType = !string.IsNullOrEmpty(Request.QueryString["strContractType"]) ? Request.QueryString["strContractType"].ToString() : "";
        string    strMonitorID    = !string.IsNullOrEmpty(Request.QueryString["strMonitorId"]) ? Request.QueryString["strMonitorId"].ToString() : "";

        //所有样品信息
        if (!string.IsNullOrEmpty(Request.QueryString["QC"]) && Request.QueryString["QC"] == "true")
        {
            // intTotalCount = new TMisMonitorSampleInfoLogic().GetAllSampleInfoCountByTask(strTaskID, strMonitorID);
            dt = new TMisMonitorSampleInfoLogic().GetAllSampleInfoSourceByTask(strTaskID, strMonitorID);
        }
        else
        {
            intTotalCount = new TMisMonitorSampleInfoLogic().GetSampleInfoCountByTask(strTaskID, strMonitorID);
            dt            = new TMisMonitorSampleInfoLogic().GetSampleInfoSourceByTask(strTaskID, strMonitorID, intPageIndex, intPageSize);
        }
        return(CreateToJson(dt, intTotalCount));
    }
Exemple #12
0
    public static string saveResult(string id, string strItemResult)
    {
        TMisMonitorResultVo objResult = new TMisMonitorResultVo();

        objResult.ID          = id;
        objResult.ITEM_RESULT = strItemResult;
        if (strItemResult.Trim().Length == 0)
        {
            objResult.ITEM_RESULT = ConstValues.SpecialCharacter.EmptyValuesFillChar;
        }
        else
        {
            objResult.ITEM_RESULT = strItemResult;
        }
        //objResult.REMARK_4 = "1";

        //'余氯','透明度','pH值','电导率','溶解氧'
        //以上项目,环境质量由现场室监测,污染源由实验室监测
        string strEnvSampleItemID = "FS0000005,FS0000006,FS0000009,FS0000012,001000159";
        string strEnvType         = "EnvRiver,EnvReservoir,EnvRain,EnvMudRiver,EnvDrinkingSource,EnvDrinking";

        if (strEnvSampleItemID.Contains(objResult.ITEM_ID))
        {
            TMisMonitorSampleInfoVo objSample  = new TMisMonitorSampleInfoLogic().Details(objResult.SAMPLE_ID);
            TMisMonitorSubtaskVo    objSubTask = new TMisMonitorSubtaskLogic().Details(objSample.SUBTASK_ID);
            if (!strEnvType.Contains(objSubTask.MONITOR_ID))
            {
                objResult.REMARK_4 = "1";
            }
        }

        bool isSuccess = new TMisMonitorResultLogic().Edit(objResult);

        return(isSuccess == true ? "1" : "0");
    }
Exemple #13
0
    //获取指定点位的监测项目信息
    private string getItemList()
    {
        string strSampleID  = Request.Params["strSampleID"];
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        string strSelPointID = (Request.Params["selPointID"] != null) ? Request.Params["selPointID"] : "";

        if (strSelPointID.Length <= 0)
        {
            //return "";
        }

        if (strSortname == null || strSortname.Length < 0)
        {
            strSortname = TMisMonitorTaskItemVo.ID_FIELD;
        }

        TMisMonitorResultVo objResult = new TMisMonitorResultVo();

        if (strSampleID == null)
        {
            strSampleID = strSelPointID;
        }
        objResult.SAMPLE_ID  = strSampleID;
        objResult.SORT_FIELD = strSortname;
        objResult.SORT_TYPE  = strSortorder;
        DataTable dt = new TMisMonitorResultLogic().SelectByTable(objResult, intPageIdx, intPagesize);

        TMisMonitorSampleInfoVo SampleInfoVo = new TMisMonitorSampleInfoLogic().Details(strSampleID);
        TMisMonitorSubtaskVo    SubtaskVo    = new TMisMonitorSubtaskLogic().Details(SampleInfoVo.SUBTASK_ID);
        TMisMonitorTaskVo       TaskVo       = new TMisMonitorTaskLogic().Details(SubtaskVo.TASK_ID);

        DataColumn dcP;

        dcP = new DataColumn("TASK_POINT_ID", Type.GetType("System.String"));
        dt.Columns.Add(dcP);
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dt.Rows[i]["TASK_POINT_ID"] = strSelPointID;
            dt.Rows[i]["REMARK_1"]      = TaskVo.TEST_PURPOSE;
        }
        int intTotalCount = new TMisMonitorResultLogic().GetSelectResultCount(objResult);

        //TMisMonitorTaskItemVo objPointItem = new TMisMonitorTaskItemVo();
        //objPointItem.IS_DEL = "0";
        //objPointItem.TASK_POINT_ID = strSelPointID;
        //objPointItem.SORT_FIELD = strSortname;
        //objPointItem.SORT_TYPE = strSortorder;
        //TMisMonitorTaskItemLogic logicPointItem = new TMisMonitorTaskItemLogic();

        //int intTotalCount = logicPointItem.GetSelectResultCount(objPointItem); ;//总计的数据条数
        //DataTable dt = logicPointItem.SelectByTable(objPointItem, intPageIdx, intPagesize);

        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Exemple #14
0
    /// <summary>
    /// 创建原因:根据样品ID 获取样品信息
    /// 创建人:胡方扬
    /// 创建日期:2013-07-10
    /// </summary>
    /// <param name="strSampleId"></param>
    /// <returns></returns>
    public string getSampleInfor(string strSampleId)
    {
        DataTable dt = new TMisMonitorSampleInfoLogic().SelectByTable(new TMisMonitorSampleInfoVo {
            ID = strSampleId
        });

        return(LigerGridDataToJson(dt, dt.Rows.Count));
    }
Exemple #15
0
    public static bool QcSave(string strSampleID, string strQcType, string strItemId, string strQcAddValue)
    {
        deleteSampleInfo(strSampleID, strQcType);
        bool isSuccess = true;

        if (strItemId == "")
        {
            return(isSuccess);
        }

        string strSourceResultId          = "";
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoLogic().Details(strSampleID);

        objSample.ID                    = GetSerialNumber("MonitorSampleId");
        objSample.QC_TYPE               = strQcType;
        objSample.QC_SOURCE_ID          = strSampleID;
        objSample.SAMPLE_NAME          += "现场加标";
        objSample.SAMPLE_CODE           = GetSampleCode(strSampleID);
        objSample.SAMPLECODE_CREATEDATE = DateTime.Now.ToString("yyyy-MM-dd");
        if (!new TMisMonitorSampleInfoLogic().Create(objSample))
        {
            isSuccess = false;
        }

        for (int i = 0; i < strItemId.Split(',').Length; i++)
        {
            TMisMonitorResultVo objResult = new TMisMonitorResultVo();
            objResult.SAMPLE_ID = strSampleID;
            objResult.QC_TYPE   = "0";
            objResult.ITEM_ID   = strItemId.Split(',')[i];
            objResult           = new TMisMonitorResultLogic().Details(objResult);

            strSourceResultId      = objResult.ID;
            objResult.ID           = GetSerialNumber("MonitorResultId");
            objResult.SAMPLE_ID    = objSample.ID;
            objResult.QC_TYPE      = strQcType;
            objResult.QC_SOURCE_ID = strSourceResultId;
            objResult.SOURCE_ID    = strSourceResultId;
            objResult.QC           = "###";
            if (!new TMisMonitorResultLogic().Create(objResult))
            {
                isSuccess = false;
            }
            InsertResultAPP(objResult.ID);

            TMisMonitorQcAddVo objQcAdd = new TMisMonitorQcAddVo();
            objQcAdd.ID            = GetSerialNumber("QcAddId");
            objQcAdd.RESULT_ID_SRC = strSourceResultId;
            objQcAdd.RESULT_ID_ADD = objResult.ID;
            objQcAdd.QC_TYPE       = strQcType;
            objQcAdd.QC_ADD        = strQcAddValue.Split(',')[i];
            if (!new TMisMonitorQcAddLogic().Create(objQcAdd))
            {
                isSuccess = false;
            }
        }
        return(isSuccess);
    }
Exemple #16
0
    public static string UpdateSampleCode(string strSubTaskId, string strSampleId, string strDateCode, string isAll)
    {
        string result           = "";
        string strSampleCode    = "";
        string strNewSampleCode = "";

        string[] objStr;
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoVo();

        if (isAll == "true")
        {
            List <TMisMonitorSampleInfoVo> list = new List <TMisMonitorSampleInfoVo>();
            objSample.SUBTASK_ID = strSubTaskId;
            list = new TMisMonitorSampleInfoLogic().SelectByObject(objSample, 0, 0);
            for (int i = 0; i < list.Count; i++)
            {
                strSampleCode = list[i].SAMPLE_CODE;
                objStr        = strSampleCode.Split('-');

                if (objStr.Length == 3)
                {
                    strNewSampleCode  = objStr[0].ToString();
                    strNewSampleCode += "-" + objStr[1].ToString().Substring(0, 2) + strDateCode;
                    strNewSampleCode += "-" + objStr[2].ToString();

                    objSample             = new TMisMonitorSampleInfoVo();
                    objSample.ID          = list[i].ID;
                    objSample.SAMPLE_CODE = strNewSampleCode;
                    if (new TMisMonitorSampleInfoLogic().Edit(objSample))
                    {
                        result = "true";
                    }
                }
            }
        }
        else
        {
            objSample     = new TMisMonitorSampleInfoLogic().Details(strSampleId);
            strSampleCode = objSample.SAMPLE_CODE;
            objStr        = strSampleCode.Split('-');

            if (objStr.Length == 3)
            {
                strNewSampleCode  = objStr[0].ToString();
                strNewSampleCode += "-" + objStr[1].ToString().Substring(0, 2) + strDateCode;
                strNewSampleCode += "-" + objStr[2].ToString();

                objSample             = new TMisMonitorSampleInfoVo();
                objSample.ID          = strSampleId;
                objSample.SAMPLE_CODE = strNewSampleCode;
                if (new TMisMonitorSampleInfoLogic().Edit(objSample))
                {
                    result = "true";
                }
            }
        }
        return(result);
    }
    public void SplitFunctionNoiseByHour(string strSubTaskID)
    {
        TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskLogic().Details(strSubTaskID);

        if (objSubtaskVo.SAMPLING_METHOD != "1")  //SAMPLE_METHOD='1'时表示该任务已进行了拆分
        {
            objSubtaskVo.SAMPLING_METHOD = "1";
            List <TMisMonitorSampleInfoVo> listSample = new List <TMisMonitorSampleInfoVo>();
            TMisMonitorSampleInfoVo        objSample  = new TMisMonitorSampleInfoVo();
            objSample.SUBTASK_ID = strSubTaskID;
            TMisMonitorSampleInfoVo objSampleSet = new TMisMonitorSampleInfoVo();
            objSampleSet.ENV_HOUR = "0";
            new TMisMonitorSampleInfoLogic().Edit(objSampleSet, objSample);

            listSample = new TMisMonitorSampleInfoLogic().SelectByObject(objSample, 0, 0);
            for (int i = 0; i < listSample.Count; i++)
            {
                objSample = listSample[i];

                TMisMonitorResultVo objResultVo = new TMisMonitorResultVo();
                objResultVo.SAMPLE_ID = objSample.ID;
                List <TMisMonitorResultVo> listResult = new List <TMisMonitorResultVo>();
                listResult = new TMisMonitorResultLogic().SelectByObject(objResultVo, 0, 0);
                for (int j = 1; j < 24; j++)
                {
                    objSampleSet = new TMisMonitorSampleInfoVo();
                    CopyObject(objSample, objSampleSet);
                    objSampleSet.ID       = GetSerialNumber("MonitorSampleId");
                    objSampleSet.ENV_HOUR = j.ToString();

                    for (int k = 0; k < listResult.Count; k++)
                    {
                        objResultVo = listResult[k];
                        TMisMonitorResultVo objResultAdd = new TMisMonitorResultVo();
                        CopyObject(objResultVo, objResultAdd);
                        objResultAdd.ID        = GetSerialNumber("MonitorResultId");
                        objResultAdd.SAMPLE_ID = objSampleSet.ID;

                        TMisMonitorResultAppVo objResultAppVo = new TMisMonitorResultAppVo();
                        objResultAppVo.RESULT_ID = objResultVo.ID;
                        objResultAppVo           = new TMisMonitorResultAppLogic().Details(objResultAppVo);
                        TMisMonitorResultAppVo objResultAppAdd = new TMisMonitorResultAppVo();
                        CopyObject(objResultAppVo, objResultAppAdd);
                        objResultAppAdd.ID        = GetSerialNumber("MonitorResultAppId");
                        objResultAppAdd.RESULT_ID = objResultAdd.ID;

                        new TMisMonitorResultLogic().Create(objResultAdd);
                        new TMisMonitorResultAppLogic().Create(objResultAppAdd);
                    }

                    new TMisMonitorSampleInfoLogic().Create(objSampleSet);
                }
            }

            new TMisMonitorSubtaskLogic().Edit(objSubtaskVo);
        }
    }
    public static string saveSample(string strSampleId, string strSampleName)
    {
        TMisMonitorSampleInfoVo TMisMonitorSampleInfoVo = new TMisMonitorSampleInfoVo();

        TMisMonitorSampleInfoVo.ID          = strSampleId;
        TMisMonitorSampleInfoVo.SAMPLE_NAME = strSampleName == ""?"###":strSampleName;
        bool IsSuccess = new TMisMonitorSampleInfoLogic().Edit(TMisMonitorSampleInfoVo);

        return(IsSuccess ? "1" : "0");
    }
    public static string saveSampleCode(string id, string strSampleCode)
    {
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoVo();

        objSample.ID          = id;
        objSample.SAMPLE_CODE = strSampleCode;
        bool isSuccess = new TMisMonitorSampleInfoLogic().Edit(objSample);

        return(isSuccess == true ? "1" : "0");
    }
Exemple #20
0
    protected void btnImportCode_Click(object sender, EventArgs e)
    {
        string strPrintId = this.strPrintId_code.Value;

        TMisMonitorSubtaskVo objSubTask = new TMisMonitorSubtaskLogic().Details(strPrintId);
        string strCompanyName           = GetCompany_UnderTask(objSubTask.TASK_ID);
        //objSubTask.TASK_ID = strPrintId;
        //DataTable dtSub = new TMisMonitorSubtaskLogic().SelectByTable(objSubTask);
        TMisMonitorTaskVo objTaskVo    = new TMisMonitorTaskLogic().Details(objSubTask.TASK_ID);
        string            strSampleIDs = "";

        //for (int i = 0; i < dtSub.Rows.Count; i++)
        //{
        //    GetPoint_UnderTask(dtSub.Rows[i]["ID"].ToString(), ref strSampleIDs);
        //}
        GetPoint_UnderTask(strPrintId, ref strSampleIDs);

        //获取基本信息
        DataTable dt = new TMisMonitorSampleInfoLogic().getSamplingAllocationSheetInfoBySampleId(strSampleIDs, "02,021", "1");

        FileStream   file         = new FileStream(HttpContext.Current.Server.MapPath("template/SamplingCodingSheet.xls"), FileMode.Open, FileAccess.Read);
        HSSFWorkbook hssfworkbook = new HSSFWorkbook(file);
        ISheet       sheet        = hssfworkbook.GetSheet("Sheet1");

        sheet.GetRow(2).GetCell(1).SetCellValue(DateTime.Now.ToString("yyyy年MM月dd日"));

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            int j = i + 1;
            sheet.GetRow(i + 6).GetCell(0).SetCellValue(j.ToString());
            if (objTaskVo.TASK_TYPE == "1")  //常规任务
            {
                sheet.GetRow(i + 6).GetCell(1).SetCellValue(dt.Rows[i]["SAMPLE_NAME"].ToString());
            }
            else
            {
                sheet.GetRow(i + 6).GetCell(1).SetCellValue(strCompanyName + dt.Rows[i]["SAMPLE_NAME"].ToString());
            }
            //sheet.GetRow(i + 6).GetCell(3).SetCellValue("1");
            sheet.GetRow(i + 6).GetCell(5).SetCellValue(dt.Rows[i]["SAMPLE_CODE"].ToString());
        }
        using (MemoryStream stream = new MemoryStream())
        {
            hssfworkbook.Write(stream);
            HttpContext curContext = HttpContext.Current;
            // 设置编码和附件格式
            curContext.Response.ContentType     = "application/vnd.ms-excel";
            curContext.Response.ContentEncoding = Encoding.UTF8;
            curContext.Response.Charset         = "";
            curContext.Response.AppendHeader("Content-Disposition",
                                             "attachment;filename=" + HttpUtility.UrlEncode("样品编码表.xls", Encoding.UTF8));
            curContext.Response.BinaryWrite(stream.GetBuffer());
            curContext.Response.End();
        }
    }
    /// <summary>
    /// 获取现场质控信息
    /// </summary>
    /// <param name="strThreeGridId"></param>
    /// <returns></returns>
    private string getQCGrid1Info(string strResultId, string strItemID)
    {
        TMisMonitorResultVo     objResultVo = new TMisMonitorResultLogic().Details(strResultId);
        TMisMonitorSampleInfoVo objSampleVo = new TMisMonitorSampleInfoLogic().Details(objResultVo.SAMPLE_ID);

        DataTable dtOuter   = new TMisMonitorResultLogic().getQcDetailInfo_QY(strResultId, "0", objSampleVo.SUBTASK_ID, strItemID);
        DataTable objtTable = dtOuter;
        string    strJson   = CreateToJson(objtTable, objtTable.Rows.Count);

        return(strJson);
    }
Exemple #22
0
    /// <summary>
    /// 获取样品信息
    /// </summary>
    /// <returns></returns>
    private string getThreeGridInfo(string strTwoGridId)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        var strCCflowWorkId       = Request.QueryString["strCCflowWorkId"];
        var subFlowId             = CCFlowFacade.GetFatherThreadIDOfSubFlow(LogInfo.UserInfo.USER_NAME, Convert.ToInt64(strCCflowWorkId));
        var subFlowIdentification = CCFlowFacade.GetFlowIdentification(LogInfo.UserInfo.USER_NAME, subFlowId);

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

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

        DataTable dt            = new DataTable();
        int       intTotalCount = 0;

        dt            = new TMisMonitorSampleInfoLogic().SelectSampleSitePoint(strTwoGridId);
        intTotalCount = new TMisMonitorSampleInfoLogic().SelectSampleSitePointCount(strTwoGridId);

        var newDT = new DataTable();

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

        foreach (DataRow row in dt.Rows)
        {
            if (sampleIdList.Count > 0 && !sampleIdList.Contains(row["ID"].ToString()))
            {
                intTotalCount--;
                continue;
            }

            newDT.Rows.Add(row.ItemArray);
        }

        //dt = new TMisMonitorSampleInfoLogic().getSamplingForSampleItemOne_MAS(strTwoGridId, intPageIndex, intPageSize);
        //intTotalCount = new TMisMonitorSampleInfoLogic().getSamplingCountForSampleItemOne_MAS(strTwoGridId);

        //dt = new TMisMonitorTaskPointLogic().SelectSampleDeptPoint(strTwoGridId);
        //intTotalCount = dt.Rows.Count;

        string strJson = CreateToJson(newDT, intTotalCount);

        return(strJson);
    }
Exemple #23
0
    public static string saveSample(string id, string strSubtaskID, string strSampleCode, string strSampleName)
    {
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoVo();

        objSample             = new TMisMonitorSampleInfoLogic().Details(id);
        objSample.SAMPLE_CODE = strSampleCode;
        objSample.SAMPLE_NAME = strSampleName;
        bool isSuccess = new TMisMonitorSampleInfoLogic().Edit(objSample);

        return(isSuccess == true ? "1" : "0");
    }
Exemple #24
0
    public static string saveSampleCode(string id, string strSampleCode, string strIsOk, string strAskingdate)
    {
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoVo();

        objSample.ID          = id;
        objSample.SAMPLE_CODE = strSampleCode;
        objSample.REMARK4     = strIsOk == "" ? "###" : strIsOk;
        objSample.REMARK5     = strAskingdate == "" ? "###" : UTCConvert(strAskingdate);
        bool isSuccess = new TMisMonitorSampleInfoLogic().Edit(objSample);

        return(isSuccess == true ? "1" : "0");
    }
    public static string saveSample(string id, string strSubtaskID, string strSampleCode, string strSampleName, string strOriginalNum, string strSampleDes)
    {
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoVo();

        objSample             = new TMisMonitorSampleInfoLogic().Details(id);
        objSample.SAMPLE_CODE = strSampleCode;
        objSample.SAMPLE_NAME = strSampleName;
        objSample.REMARK2     = strOriginalNum == "" ? "###" : strOriginalNum;
        objSample.REMARK3     = strSampleDes == "" ? "###" : strSampleDes;
        bool isSuccess = new TMisMonitorSampleInfoLogic().Edit(objSample);

        return(isSuccess == true ? "1" : "0");
    }
Exemple #26
0
    //获取点位信息
    private string getPointList()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        if (strSortname == null || strSortname.Length < 0)
        {
            strSortname = TMisMonitorTaskPointVo.NUM_FIELD;
        }

        string strSubtaskID = this.SUBTASK_ID.Value;

        if (strSubtaskID.Length == 0)
        {
            return("");
        }

        TMisMonitorSampleInfoVo objSampleInfo = new TMisMonitorSampleInfoVo();

        objSampleInfo.SUBTASK_ID = strSubtaskID;
        //objSampleInfo.QC_TYPE = "0";
        objSampleInfo.SORT_FIELD = "ISNULL(SAMPLE_COUNT,'9999'),POINT_ID,ID";
        objSampleInfo.NOSAMPLE   = "0";
        DataTable dtSample = new DataTable();
        DataTable dt       = new TMisMonitorSampleInfoLogic().SelectByTableForPoint(objSampleInfo, intPageIndex, intPageSize);

        dtSample = dt.Clone();
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dtSample.ImportRow(dt.Rows[i]);
            //objSampleInfo.QC_TYPE = "";
            //objSampleInfo.QC_SOURCE_ID = dt.Rows[i]["ID"].ToString();
            //objSampleInfo.SORT_FIELD = "QC_TYPE";
            //objSampleInfo.NOSAMPLE = "0";
            //DataTable dtQcSample = new TMisMonitorSampleInfoLogic().SelectByTableForPoint(objSampleInfo, 0, 0);
            //for (int j = 0; j < dtQcSample.Rows.Count; j++)
            //{
            //    DataRow dr = dt.NewRow();
            //    dr = dtQcSample.Rows[j];
            //    dtSample.ImportRow(dr);
            //}
        }
        int    intTotalCount = dtSample.Rows.Count;
        string strJson       = CreateToJson(dtSample, intTotalCount);

        return(strJson);
    }
    /// <summary>
    /// 功能描述:样品生成规则 Create By Castle(胡方扬) 2014-04-19
    /// </summary>
    /// <param name="strSampleID"></param>
    /// <returns></returns>
    protected static string GetSampleCode(string strSampleID)
    {
        string strSampleCode = "";
        TMisMonitorSampleInfoVo objSample  = new TMisMonitorSampleInfoLogic().Details(strSampleID);
        TMisMonitorSubtaskVo    objSubtask = new TMisMonitorSubtaskLogic().Details(objSample.SUBTASK_ID);
        TMisMonitorTaskVo       objTask    = new TMisMonitorTaskLogic().Details(objSubtask.TASK_ID);
        TBaseSerialruleVo       objSerial  = new TBaseSerialruleVo();

        objSerial.SAMPLE_SOURCE = objTask.SAMPLE_SOURCE;
        objSerial.SERIAL_TYPE   = "2";

        strSampleCode = CreateBaseDefineCodeForSample(objSerial, objTask, objSubtask);
        return(strSampleCode);
    }
    public static string deletePoint(string strValue)
    {
        TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoLogic().Details(strValue);

        TMisMonitorTaskPointVo objPoint = new TMisMonitorTaskPointVo();

        objPoint.ID     = objSample.POINT_ID;
        objPoint.IS_DEL = "1";
        bool isSuccess = new TMisMonitorTaskPointLogic().Edit(objPoint);

        isSuccess = new TMisMonitorSampleInfoLogic().Delete(objSample);

        return(isSuccess == true ? "1" : "0");
    }
Exemple #29
0
    /// <summary>
    /// 退回监测项目
    /// </summary>
    /// <param name="strResultId">结果ID</param>
    /// <returns></returns>
    public string GoToBack(string strResultIds, string strSuggestion)
    {
        bool isSuccess = true;

        string[] strResultId = strResultIds.Split(',');
        for (int i = 0; i < strResultId.Length; i++)
        {
            TBaseItemInfoVo BaseItemInfoVo = new TBaseItemInfoVo();
            BaseItemInfoVo = new TBaseItemInfoLogic().Details(new TMisMonitorResultLogic().Details(strResultId[i].ToString()).ITEM_ID);

            TMisMonitorResultVo TMisMonitorResultVo = new TMisMonitorResultVo();
            TMisMonitorResultVo.ID        = strResultId[i].ToString();
            TMisMonitorResultVo.TASK_TYPE = "退回";
            if (BaseItemInfoVo.IS_ANYSCENE_ITEM == "1")         //分析类现场监测项目 退回到:00
            {
                TMisMonitorResultVo.RESULT_STATUS = "00";
            }
            else
            {
                TMisMonitorResultVo.RESULT_STATUS = "01";       //分析类监测项目 退回到:01
            }
            isSuccess = new TMisMonitorResultLogic().Edit(TMisMonitorResultVo);

            TMisMonitorResultVo = new TMisMonitorResultLogic().Details(strResultId[i].ToString());
            TMisMonitorSampleInfoVo objSampleInfoVo = new TMisMonitorSampleInfoLogic().Details(TMisMonitorResultVo.SAMPLE_ID);
            TMisMonitorSubtaskVo    objSubtaskVo    = new TMisMonitorSubtaskLogic().Details(objSampleInfoVo.SUBTASK_ID);

            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = objSubtaskVo.TASK_ID;
            objReturnInfoVo.SUBTASK_ID     = objSubtaskVo.ID;
            objReturnInfoVo.RESULT_ID      = strResultId[i].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_007;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_006;
            TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            if (obj.ID.Length > 0)
            {
                objReturnInfoVo.ID         = obj.ID;
                objReturnInfoVo.SUGGESTION = strSuggestion;
                isSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
            }
            else
            {
                objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
                objReturnInfoVo.SUGGESTION = strSuggestion;
                isSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
            }
        }

        return(isSuccess == true ? "1" : "0");
    }
Exemple #30
0
    public static string SaveStopReason(string strValue, string strReason)
    {
        string result = "";
        TMisMonitorSampleInfoVo     objSample = new TMisMonitorSampleInfoLogic().Details(strValue);
        TMisContractPlanPointstopVo objItems  = new TMisContractPlanPointstopVo();

        objItems.STOPRESON     = strReason;
        objItems.ACTION_USERID = new PageBase().LogInfo.UserInfo.ID.ToString();
        objItems.ACTIONDATE    = DateTime.Now.ToString();
        if (new TMisContractPlanPointstopLogic().InsertStopPointForSampleItems(objSample.POINT_ID, objItems))
        {
            result = "true";
        }
        return(result);
    }