Ejemplo n.º 1
0
        /// <summary>
        /// Deletes a NotificationType record
        /// </summary>
        public static int Delete(NotificationTypeDO DO)
        {
            SqlParameter _NotificationTypeID = new SqlParameter("NotificationTypeID", SqlDbType.VarChar);

            _NotificationTypeID.Value = DO.NotificationTypeID;

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

            return DataCommon.ExecuteScalar("[dbo].[NotificationType_Delete]", _params, "dbo");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new NotificationType record
        /// </summary>
        public static void Create(NotificationTypeDO DO)
        {
            SqlParameter _NotificationTypeID = new SqlParameter("NotificationTypeID", SqlDbType.VarChar);

            _NotificationTypeID.Value = DO.NotificationTypeID;

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

            DataCommon.ExecuteNonQuery("[dbo].[NotificationType_Insert]", _params, "dbo");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets all NotificationType records
        /// </summary>
        public static NotificationTypeDO[] GetAll()
        {
            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[NotificationType_GetAll]", new SqlParameter[] { }, "dbo");

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

            while(sr.Read()){

                NotificationTypeDO obj = new NotificationTypeDO();

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Selects NotificationType records by PK
        /// </summary>
        public static NotificationTypeDO[] GetByPK(String NotificationTypeID)
        {
            SqlParameter _NotificationTypeID = new SqlParameter("NotificationTypeID", SqlDbType.VarChar);

            _NotificationTypeID.Value = NotificationTypeID;

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

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

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

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

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }