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"); }
/// <summary> /// 获取指定监测计划的监测类别信息 /// </summary> /// <returns></returns> private DataTable GetPendingPlanDistinctMonitorDataTable(string strPlanId) { DataTable dt = new DataTable(); if (!String.IsNullOrEmpty(strPlanId)) { TMisContractPlanPointVo objItems = new TMisContractPlanPointVo(); objItems.PLAN_ID = strPlanId; dt = new TMisContractPlanPointLogic().GetPendingPlanDistinctMonitorDataTable(objItems); } return(dt); }