예제 #1
0
        /// <summary>
        /// Deletes a OwnershipType record
        /// </summary>
        public static int Delete(OwnershipTypeDO DO)
        {
            SqlParameter _OwnershipTypeID = new SqlParameter("OwnershipTypeID", SqlDbType.VarChar);

            _OwnershipTypeID.Value = DO.OwnershipTypeID;

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

            return DataCommon.ExecuteScalar("[dbo].[OwnershipType_Delete]", _params, "dbo");
        }
예제 #2
0
        /// <summary>
        /// Creates a new OwnershipType record
        /// </summary>
        public static void Create(OwnershipTypeDO DO)
        {
            SqlParameter _OwnershipTypeID = new SqlParameter("OwnershipTypeID", SqlDbType.VarChar);

            _OwnershipTypeID.Value = DO.OwnershipTypeID;

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

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

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

            while(sr.Read()){

                OwnershipTypeDO obj = new OwnershipTypeDO();

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

                objs.Add(obj);
            }

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

            _OwnershipTypeID.Value = OwnershipTypeID;

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

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

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

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

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }