/// <summary>
        /// Deletes a OtherPermitStatus record
        /// </summary>
        public static int Delete(OtherPermitStatusDO DO)
        {
            SqlParameter _OtherPermitStatusID = new SqlParameter("OtherPermitStatusID", SqlDbType.VarChar);

            _OtherPermitStatusID.Value = DO.OtherPermitStatusID;

            SqlParameter[] _params = new SqlParameter[] {
                _OtherPermitStatusID
            };

            return DataCommon.ExecuteScalar("[dbo].[OtherPermitStatus_Delete]", _params, "dbo");
        }
        /// <summary>
        /// Creates a new OtherPermitStatus record
        /// </summary>
        public static void Create(OtherPermitStatusDO DO)
        {
            SqlParameter _OtherPermitStatusID = new SqlParameter("OtherPermitStatusID", SqlDbType.VarChar);

            _OtherPermitStatusID.Value = DO.OtherPermitStatusID;

            SqlParameter[] _params = new SqlParameter[] {
                _OtherPermitStatusID
            };

            DataCommon.ExecuteNonQuery("[dbo].[OtherPermitStatus_Insert]", _params, "dbo");
        }
        /// <summary>
        /// Gets all OtherPermitStatus records
        /// </summary>
        public static OtherPermitStatusDO[] GetAll()
        {
            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[OtherPermitStatus_GetAll]", new SqlParameter[] { }, "dbo");

            List<OtherPermitStatusDO> objs = new List<OtherPermitStatusDO>();

            while(sr.Read()){

                OtherPermitStatusDO obj = new OtherPermitStatusDO();

                obj.OtherPermitStatusID = sr.GetString(sr.GetOrdinal("OtherPermitStatusID"));

                objs.Add(obj);
            }

            return objs.ToArray();
        }
        /// <summary>
        /// Selects OtherPermitStatus records by PK
        /// </summary>
        public static OtherPermitStatusDO[] GetByPK(String OtherPermitStatusID)
        {
            SqlParameter _OtherPermitStatusID = new SqlParameter("OtherPermitStatusID", SqlDbType.VarChar);

            _OtherPermitStatusID.Value = OtherPermitStatusID;

            SqlParameter[] _params = new SqlParameter[] {
                _OtherPermitStatusID
            };

            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[OtherPermitStatus_GetByPK]", _params, "dbo");

            List<OtherPermitStatusDO> objs = new List<OtherPermitStatusDO>();

            while(sr.Read())
            {
                OtherPermitStatusDO obj = new OtherPermitStatusDO();

                obj.OtherPermitStatusID = sr.GetString(sr.GetOrdinal("OtherPermitStatusID"));

                objs.Add(obj);
            }

            return objs.ToArray();
        }