/// <summary>
        /// Deletes a DeficiencyStatus record
        /// </summary>
        public static int Delete(DeficiencyStatusDO DO)
        {
            SqlParameter _DeficiencyStatusID = new SqlParameter("DeficiencyStatusID", SqlDbType.VarChar);

            _DeficiencyStatusID.Value = DO.DeficiencyStatusID;

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

            return DataCommon.ExecuteScalar("[dbo].[DeficiencyStatus_Delete]", _params, "dbo");
        }
        /// <summary>
        /// Creates a new DeficiencyStatus record
        /// </summary>
        public static void Create(DeficiencyStatusDO DO)
        {
            SqlParameter _DeficiencyStatusID = new SqlParameter("DeficiencyStatusID", SqlDbType.VarChar);

            _DeficiencyStatusID.Value = DO.DeficiencyStatusID;

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

            DataCommon.ExecuteNonQuery("[dbo].[DeficiencyStatus_Insert]", _params, "dbo");
        }
        /// <summary>
        /// Gets all DeficiencyStatus records
        /// </summary>
        public static DeficiencyStatusDO[] GetAll()
        {
            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[DeficiencyStatus_GetAll]", new SqlParameter[] { }, "dbo");

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

            while(sr.Read()){

                DeficiencyStatusDO obj = new DeficiencyStatusDO();

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }
        /// <summary>
        /// Selects DeficiencyStatus records by PK
        /// </summary>
        public static DeficiencyStatusDO[] GetByPK(String DeficiencyStatusID)
        {
            SqlParameter _DeficiencyStatusID = new SqlParameter("DeficiencyStatusID", SqlDbType.VarChar);

            _DeficiencyStatusID.Value = DeficiencyStatusID;

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

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

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

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

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }