/// <summary> /// 获取监测类别名称 /// </summary> /// <param name="strMonitorTypeId">监测类别Id</param> /// <returns></returns> public static string getMonitorTypeName(string strMonitorTypeId) { i3.ValueObject.Channels.Base.MonitorType.TBaseMonitorTypeInfoVo TBaseMonitorTypeInfoVo = new i3.ValueObject.Channels.Base.MonitorType.TBaseMonitorTypeInfoVo(); TBaseMonitorTypeInfoVo.ID = strMonitorTypeId; string strMonitorTypeName = new i3.BusinessLogic.Channels.Base.MonitorType.TBaseMonitorTypeInfoLogic().Details(TBaseMonitorTypeInfoVo).MONITOR_TYPE_NAME; return strMonitorTypeName; }
public static string getMonitorType(string strTypeId) { string strReturnValue = ""; i3.ValueObject.Channels.Base.MonitorType.TBaseMonitorTypeInfoVo objMonitorTypeVo = new i3.BusinessLogic.Channels.Base.MonitorType.TBaseMonitorTypeInfoLogic().Details(strTypeId); strReturnValue = objMonitorTypeVo.REMARK1 == "" ? objMonitorTypeVo.ID : objMonitorTypeVo.REMARK1; return(strReturnValue); }
public static string getMonitorName(string strMonitorName) { string strReturnValue = ""; i3.ValueObject.Channels.Base.MonitorType.TBaseMonitorTypeInfoVo objMonitorTypeVo = new i3.BusinessLogic.Channels.Base.MonitorType.TBaseMonitorTypeInfoLogic().Details(strMonitorName); strReturnValue = objMonitorTypeVo.MONITOR_TYPE_NAME; return(strReturnValue); }
/// <summary> /// 修改项目复制人 /// </summary> /// <param name="strPlanId"></param> private void ModifTaskSampleDutyUser(string strPlanId) { if (!String.IsNullOrEmpty(strPlanId)) { TMisMonitorTaskVo objTaskDetail = new TMisMonitorTaskLogic().Details(new TMisMonitorTaskVo { PLAN_ID = strPlanId }); TMisMonitorSubtaskVo objSubTask = new TMisMonitorSubtaskVo(); objSubTask.TASK_ID = objTaskDetail.ID; objSubTask.TASK_STATUS = "01"; DataTable dt = new TMisMonitorSubtaskLogic().SelectByTable(objSubTask, 0, 0); TMisContractUserdutyVo objUserDuty = new TMisContractUserdutyVo(); objUserDuty.CONTRACT_PLAN_ID = strPlanId; DataTable dtDuty = new TMisContractUserdutyLogic().SelectByTable(objUserDuty, 0, 0); //如果没有获取到委托书的默认采样人 则取对应监测类别的 岗位职责数据 if (dt.Rows.Count > 0 && dtDuty.Rows.Count < 1) { for (int i = 0; i < dt.Rows.Count; i++) { string strMonitorType_ID = dt.Rows[i]["MONITOR_ID"].ToString(); //潘德军修改2013-7-19 环境质量的监测类别取对应的污染源类别的岗位职责 i3.ValueObject.Channels.Base.MonitorType.TBaseMonitorTypeInfoVo objMonitorType = new i3.BusinessLogic.Channels.Base.MonitorType.TBaseMonitorTypeInfoLogic().Details(strMonitorType_ID); if (objMonitorType.REMARK1.Trim().Length > 0) { strMonitorType_ID = objMonitorType.REMARK1.Trim(); } TSysDutyVo objDuty = new TSysDutyVo(); objDuty.MONITOR_TYPE_ID = strMonitorType_ID; objDuty.DICT_CODE = "duty_sampling"; DataTable objDutyDt = new TSysDutyLogic().GetDutyUser(objDuty); DataRow drr = null; if (objDutyDt.Rows.Count > 0) { //如果设置了默认负责人,则取默认负责人 DataRow[] drArr = objDutyDt.Select(" IF_DEFAULT='0'"); if (drArr.Length > 0) { drr = drArr[0]; } else { //如果未设置默认负责人,则取第一行数据 drr = objDutyDt.Rows[0]; } if (drr != null) { TMisMonitorSubtaskVo objUpSubTask = new TMisMonitorSubtaskVo(); objUpSubTask.ID = dt.Rows[i]["ID"].ToString(); objUpSubTask.SAMPLING_MANAGER_ID = drr["USERID"].ToString(); new TMisMonitorSubtaskLogic().Edit(objUpSubTask); } } } } if (dt.Rows.Count > 0 && dtDuty.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { foreach (DataRow drr in dtDuty.Rows) { if (dr["MONITOR_ID"].ToString() == drr["MONITOR_TYPE_ID"].ToString()) { TMisMonitorSubtaskVo objUpSubTask = new TMisMonitorSubtaskVo(); objUpSubTask.ID = dr["ID"].ToString(); objUpSubTask.SAMPLING_MANAGER_ID = drr["SAMPLING_MANAGER_ID"].ToString(); new TMisMonitorSubtaskLogic().Edit(objUpSubTask); } } } } } }