Ejemplo n.º 1
0
        private int getNodeTimeFrmDB(string strPlanId, string strNodeType, ref string strStartTime, ref string strFinishTime)
        {
            strStartTime  = "";
            strFinishTime = "";

            TMisMonitorProcessMgmLogic objLogic = new TMisMonitorProcessMgmLogic();
            TMisMonitorProcessMgmVo    objVo    = new TMisMonitorProcessMgmVo();

            objVo.TASK_ID = strPlanId;

            DataTable dt = objLogic.SelectByTable(objVo);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string strTmpNodeType = dt.Rows[i]["MONITOR_TYPE"].ToString().Trim();

                if (strTmpNodeType == strNodeType)
                {
                    strStartTime  = dt.Rows[i]["MONITOR_TIME_START"].ToString().Trim();
                    strFinishTime = dt.Rows[i]["MONITOR_TIME_FINISH"].ToString().Trim();

                    return(0);
                }
            }

            return(1);
        }
Ejemplo n.º 2
0
        // 首次调用此表单需要创建数据
        public void createDate(string strPlanId)
        {
            TMisMonitorProcessMgmLogic objLogic = new TMisMonitorProcessMgmLogic();
            TMisMonitorProcessMgmVo    objVo    = new TMisMonitorProcessMgmVo();

            objVo.TASK_ID = strPlanId;

            DataTable dt = objLogic.SelectByTable(objVo);

            // 第2+次加载此页面时,不用重复创建信息
            if (0 != dt.Rows.Count)
            {
                return;
            }


            for (int i = 0; i < arrTaskName.Length; i++)
            {
                objVo.Init();

                objVo.TASK_ID = strPlanId;

                objVo.ID = i3.View.PageBase.GetSerialNumber("t_mis_process_mgm_id");

                string strNodeName   = arrTaskName[i];
                string strStartTime  = "";
                string strFinishTime = "";

                GetNodeDate(strNodeName, ref strStartTime, ref strFinishTime);

                objVo.MONITOR_TIME_START  = strStartTime;
                objVo.MONITOR_TIME_FINISH = strFinishTime;
                objVo.MONITOR_TYPE        = strNodeName;

                objLogic.Create(objVo);
            }

            return;
        }