예제 #1
0
        /// <summary>
        /// Deletes a DeficiencyType record
        /// </summary>
        public static int Delete(DeficiencyTypeDO DO)
        {
            SqlParameter _DeficiencyTypeID = new SqlParameter("DeficiencyTypeID", SqlDbType.VarChar);

            _DeficiencyTypeID.Value = DO.DeficiencyTypeID;

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

            return DataCommon.ExecuteScalar("[dbo].[DeficiencyType_Delete]", _params, "dbo");
        }
예제 #2
0
        /// <summary>
        /// Creates a new DeficiencyType record
        /// </summary>
        public static void Create(DeficiencyTypeDO DO)
        {
            SqlParameter _DeficiencyTypeID = new SqlParameter("DeficiencyTypeID", SqlDbType.VarChar);

            _DeficiencyTypeID.Value = DO.DeficiencyTypeID;

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

            DataCommon.ExecuteNonQuery("[dbo].[DeficiencyType_Insert]", _params, "dbo");
        }
예제 #3
0
        /// <summary>
        /// Gets all DeficiencyType records
        /// </summary>
        public static DeficiencyTypeDO[] GetAll()
        {
            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[DeficiencyType_GetAll]", new SqlParameter[] { }, "dbo");

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

            while(sr.Read()){

                DeficiencyTypeDO obj = new DeficiencyTypeDO();

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }
예제 #4
0
        /// <summary>
        /// Selects DeficiencyType records by PK
        /// </summary>
        public static DeficiencyTypeDO[] GetByPK(String DeficiencyTypeID)
        {
            SqlParameter _DeficiencyTypeID = new SqlParameter("DeficiencyTypeID", SqlDbType.VarChar);

            _DeficiencyTypeID.Value = DeficiencyTypeID;

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

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

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

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

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }