/// <summary>
 /// The UpdateSubscriberV2 method
 /// </summary>
 /// <param name="subscriber">The subscriber parameter</param>
 /// <returns>returns true or false respectively</returns>        
 public bool UpdateSubscriberV2(Subscriber subscriber)
 {
     return this.SubscriberDAL.UpdateSubscriber(subscriber);
 }
 /// <summary>
 /// This method Updates Subscriber with specified id and subscriber information
 /// </summary>
 /// <param name="subscriber">The subscriber</param>
 /// <returns>The completion status of update operation</returns>        
 public virtual bool UpdateSubscriber(Subscriber subscriber)
 {
     return this.Business.UpdateSubscriber(subscriber);
 }
        /// <summary>
        /// The UpdateSubscriber method updates a subscriber
        /// </summary>
        /// <param name="subscriber">The subscriber parameter</param>
        /// <returns>The boolean type object</returns>        
        public bool UpdateSubscriber(Subscriber subscriber)
        {
            int subscriberId = subscriber.ID;
            string subscriberName = subscriber.Name;
            string description = subscriber.Description;

            List<DbParameter> parameters = new List<DbParameter>();
            parameters.Add(new IntParameter(Constants.Parameters.SubscriberId, subscriberId));
            parameters.Add(new StringParameter(Constants.Parameters.Name, subscriberName));
            parameters.Add(new StringParameter(Constants.Parameters.Description, description));

            int rows = ExecuteStoredProcNonQuery(Constants.StoredProcedures.UpdateSubscriber, parameters);
            if (rows == 1)
            {
                return true;
            }

            return false;
        }
        /// <summary>
        /// The GetAllSubscribers method gets the subscriber w.r.t. the ID
        /// </summary>
        /// <param name="subscriberId">The subscriberId parameter</param>
        /// <returns>returns the subscriber object</returns>        
        public Subscriber GetAllSubscribers(int subscriberId)
        {
            Subscriber subscriber = null;

            List<DbParameter> parameters = new List<DbParameter>();
            parameters.Add(new IntParameter(Constants.Parameters.SubscriberId, subscriberId));

            using (IDataReader reader = ExecuteStoredProcReader(Constants.StoredProcedures.GetSubscriber, parameters))
            {
                while (reader.Read())
                {
                    subscriber = new Subscriber();
                    subscriber.ID = subscriberId;
                    subscriber.Name = reader[1].ToString();
                    subscriber.Description = reader[2].ToString();
                    break;
                }
            }

            return subscriber;
        }
 /// <summary>
 /// This method Updates Subscriber having specified id with given details 
 /// </summary>
 /// <param name="subscriber">The updated subscriber details</param>
 /// <returns>The completion status of update operation</returns>        
 public override bool UpdateSubscriber(Subscriber subscriber)
 {
     return Business.UpdateSubscriberV2(subscriber);
 }