/// <summary>
        /// Updates a ChecklistType record and returns the number of records affected
        /// </summary>
        public static int Update(ChecklistTypeDO DO)
        {
            SqlParameter _ChecklistTypeID = new SqlParameter("ChecklistTypeID", SqlDbType.VarChar);
            
            _ChecklistTypeID.Value = DO.ChecklistTypeID;
            
            SqlParameter[] _params = new SqlParameter[] {
                _ChecklistTypeID
            };

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            return DataCommon.ExecuteScalar("[dbo].[ChecklistType_Update]", _params, pid);
        }
        /// <summary>
        /// Creates a new ChecklistType record using async
        /// </summary>
        public static async Task CreateAsync(ChecklistTypeDO DO)
        {
            SqlParameter _ChecklistTypeID = new SqlParameter("ChecklistTypeID", SqlDbType.VarChar);
            
            _ChecklistTypeID.Value = DO.ChecklistTypeID;
            
            SqlParameter[] _params = new SqlParameter[] {
                _ChecklistTypeID
            };

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            await DataCommon.ExecuteNonQueryAsync("[dbo].[ChecklistType_Insert]", _params, pid);
            
        }
        /// <summary>
        /// Selects ChecklistType records by PK
        /// </summary>
        public static async Task<ChecklistTypeDO[]> GetByPKAsync(String ChecklistTypeID)
        {

            SqlParameter _ChecklistTypeID = new SqlParameter("ChecklistTypeID", SqlDbType.VarChar);
			
            _ChecklistTypeID.Value = ChecklistTypeID;
			
            SqlParameter[] _params = new SqlParameter[] {
                _ChecklistTypeID
            };

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            SafeReader sr = await DataCommon.ExecuteSafeReaderAsync("[dbo].[ChecklistType_GetByPK]", _params, pid);


            List<ChecklistTypeDO> objs = new List<ChecklistTypeDO>();
			
            while(sr.Read())
            {
                ChecklistTypeDO obj = new ChecklistTypeDO();
				
                obj.ChecklistTypeID = sr.GetString(sr.GetOrdinal("ChecklistTypeID"));
                

                objs.Add(obj);
            }

            return objs.ToArray();
        }
        /// <summary>
        /// Gets all ChecklistType records
        /// </summary>
        public static async Task<ChecklistTypeDO[]> GetAllAsync()
        {

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            SafeReader sr = await DataCommon.ExecuteSafeReaderAsync("[dbo].[ChecklistType_GetAll]", new SqlParameter[] { }, pid);
            
            List<ChecklistTypeDO> objs = new List<ChecklistTypeDO>();
            
            while(sr.Read()){

                ChecklistTypeDO obj = new ChecklistTypeDO();
                
                obj.ChecklistTypeID = sr.GetString(sr.GetOrdinal("ChecklistTypeID"));
                


                objs.Add(obj);
            }

            return objs.ToArray();
        }