Exemplo n.º 1
0
        /// <summary>
        /// Gets the scheme by scheme identifier.
        /// </summary>
        /// <param name="schemeID">The scheme identifier.</param>
        /// <returns></returns>
        public SchemesBO GetSchemeBySchemeID(int schemeID)
        {
            SchemesBO scheme = new SchemesBO();

            ObjectMapper.Map(StoreRepository.GetSchemeBySchemeID(schemeID), scheme);
            return(scheme);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Updates the scheme.
        /// </summary>
        /// <param name="scheme">The scheme.</param>
        /// <returns></returns>
        public bool UpdateScheme(SchemesBO scheme)
        {
            bool   isSuccess    = false;
            Scheme dealerScheme = new Scheme();

            ObjectMapper.Map(scheme, dealerScheme);
            if (dealerScheme != null && dealerScheme.SchemeID > 0)
            {
                isSuccess = StoreRepository.UpdateScheme(dealerScheme);
            }
            return(isSuccess);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Inserts the scheme.
        /// </summary>
        /// <param name="scheme">The scheme.</param>
        /// <returns></returns>
        public bool InsertScheme(SchemesBO scheme)
        {
            bool   isSuccess    = false;
            Scheme dealerScheme = new Scheme();

            ObjectMapper.Map(scheme, dealerScheme);
            if (dealerScheme != null)
            {
                isSuccess = StoreRepository.InsertScheme(dealerScheme);
            }
            return(isSuccess);
        }