///<summary>
        /// 根据自定义流程类型获取自定义流程
        ///</summary>
        ///<param name="processTypeId"></param>
        ///<returns></returns>
        public List <DiyProcess> GetDiyProcessByProcessType(int processTypeId)
        {
            List <DiyProcess> diyProcesses = new List <DiyProcess>();
            SqlCommand        cmd          = new SqlCommand();

            cmd.Parameters.Add(_Type, SqlDbType.Int).Value = processTypeId;

            using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetDiyProcessByProcessType", cmd))
            {
                while (sdr.Read())
                {
                    DiyProcess diyProcess =
                        new DiyProcess((int)sdr[_DBPKID], sdr[_DBName].ToString(), sdr[_DBRemark].ToString(),
                                       new ProcessType((int)sdr[_DBType],
                                                       ProcessType.FindProcessTypeByID((int)sdr[_DBType])));
                    diyProcesses.Add(diyProcess);
                }
            }

            return(diyProcesses);
        }
        /// <summary>
        /// 根据自定义流程
        /// </summary>
        /// <param name="diyProcessID"></param>
        /// <returns></returns>
        public DiyProcess GetDiyProcessByPKID(int diyProcessID)
        {
            DiyProcess diyProcess = null;
            SqlCommand cmd        = new SqlCommand();

            cmd.Parameters.Add(_PKID, SqlDbType.Int).Value = diyProcessID;

            using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetDiyProcessByPKID", cmd))
            {
                while (sdr.Read())
                {
                    diyProcess =
                        new DiyProcess((int)sdr[_DBPKID], sdr[_DBName].ToString(), sdr[_DBRemark].ToString(),
                                       new ProcessType((int)sdr[_DBType],
                                                       ProcessType.FindProcessTypeByID((int)sdr[_DBType])));
                }
            }
            if (diyProcess != null)
            {
                diyProcess.DiySteps = GetDiyStepsByDiyProcessID(diyProcessID);
            }
            return(diyProcess);
        }